badaso icon indicating copy to clipboard operation
badaso copied to clipboard

Impossible to remove all permission of a role

Open Dri372 opened this issue 2 years ago • 2 comments

Describe the bug You cannot remove all permission of a role, you have to let one.

To Reproduce • Fresh Badaso install • Customer rôle has no permission • create one permission • save • try to remove the permission → Danger msg

Enhancement • Have a config option to not attach the rôle customer to a new registered user.

Dri372 avatar Jul 18 '22 15:07 Dri372

Whats the point for remove all permission of the role ?

For now

Just remove all permission for the customer role if you dont wanna customer have a permission

you also can rename the customer role if you want too

rizkiheryandi avatar Aug 09 '22 09:08 rizkiheryandi

Whats the point for remove all permission of the role ?

See my post "To reproduce"

Cause of the problem file : BadasoRolePermissionController.php method : addOrEdit code : $request->validate([ 'permissions' => ['required'], <--------- empty array -> field not present *

  • https://laravel.com/docs/9.x/validation#rule-required

Dri372 avatar Aug 10 '22 10:08 Dri372

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 31 '22 01:10 stale[bot]