Skip to content
New issue

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

Bug in Config/Roles.php #161

Closed
Solotov opened this issue Aug 8, 2021 · 1 comment
Closed

Bug in Config/Roles.php #161

Solotov opened this issue Aug 8, 2021 · 1 comment

Comments

@Solotov
Copy link

Solotov commented Aug 8, 2021

I have found a repeating key, which causes malfunctioning of the forms for creating or editing permissions and roles.
the issue comes from this settings file:
vendor/jeremykenedy/laravel-roles/src/config/roles.php: line 128 to 133

incorrect settings :

// User Permissions or Role needed to create a new role

'rolesGuiCreateNewRolesMiddlewareType'   => env('ROLES_GUI_CREATE_ROLE_MIDDLEWARE_TYPE', 'role'), 
'rolesGuiCreateNewRolesMiddleware'       => env('ROLES_GUI_CREATE_ROLE_MIDDLEWARE_TYPE', 'admin'),

// User Permissions or Role needed to create a new permission

'rolesGuiCreateNewPermissionMiddlewareType'  => env('ROLES_GUI_CREATE_PERMISSION_MIDDLEWARE_TYPE', 'role'), 
'rolesGuiCreateNewPermissionsMiddleware'     => env('ROLES_GUI_CREATE_PERMISSION_MIDDLEWARE_TYPE', 'admin'),

suggested solution :

// User Permissions or Role needed to create a new role

'rolesGuiCreateNewRolesMiddlewareType'   => env('ROLES_GUI_CREATE_ROLE_MIDDLEWARE_TYPE', 'role'), 
'rolesGuiCreateNewRolesMiddleware'       => env('ROLES_GUI_CREATE_ROLE_MIDDLEWARE', 'admin'),

// User Permissions or Role needed to create a new permission

'rolesGuiCreateNewPermissionMiddlewareType'  => env('ROLES_GUI_CREATE_PERMISSION_MIDDLEWARE_TYPE', 'role'), 
'rolesGuiCreateNewPermissionsMiddleware'     => env('ROLES_GUI_CREATE_PERMISSION_MIDDLEWARE', 'admin'),

I have solved this problem by editing the (published) config/roles.php file of my project,
but the original package file still has the error.

Thanks,

@jeremykenedy
Copy link
Owner

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants