laravel-acl icon indicating copy to clipboard operation
laravel-acl copied to clipboard

Permission with empty slug

Open nglelinh opened this issue 10 years ago • 2 comments
trafficstars

  1. Get a user
  2. Add new permission, e.g. update.user
  3. Remove permission update.user

Actual: permission "user" with empty slug Expect: remove whole permission, as we have for role's permission

nglelinh avatar Apr 01 '15 16:04 nglelinh

@nglelinh $user->removePermission('view.user') will remove the view.user permission. $user->removePermission('user') will remove the whole user alias permission.

Is it not like that? Last i checked it was working.

kodeine avatar Apr 01 '15 17:04 kodeine

@kodeine: yes, it works as you say. But I mean that, after removing last permission in an alias (empty slug), the whole alias should be automatically deleted as well. We have the same behavior with role permissions as well.

nglelinh avatar Apr 02 '15 02:04 nglelinh