We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using version 1.3.1 on Nova 4.22.1.
When replicating a role, none of the permissions are checked.
The text was updated successfully, but these errors were encountered:
@sanderbaas @leandrogehlen
You can try adding custom resolver to your permissions field:
Checkboxes::make(__('Permissions'), 'permissions') ->options($this->loadPermissions()->map(function ($permission) { return [ 'group' => $this->translatePermissions(ucfirst($permission->group)), 'option' => $permission->name, 'label' => $this->translatePermissions($permission->name), ]; }) ->groupBy('group') ->toArray() ) ->resolveUsing(function ($value) use ($request) { if ($request->get('fromResourceId')) { return \Sereny\NovaPermissions\Models\Role::find($request->get('fromResourceId'))->permissions->pluck('name')->toArray(); } return $value->pluck('name')->toArray(); }),
Sorry, something went wrong.
Thanks for the suggestion.
Can you make a PR to solve this issue?
Please check if is there some more elegant way instead of $request->get('fromResourceId')
$request->get('fromResourceId')
No branches or pull requests
I am using version 1.3.1 on Nova 4.22.1.
When replicating a role, none of the permissions are checked.
The text was updated successfully, but these errors were encountered: