Skip to content

6.1.0

Choose a tag to compare

@santigarcor santigarcor released this 29 May 23:06
· 241 commits to master since this release

Add roles restrictions in the admin panel

This release enables the possibility to add restriction to roles in the admin panel.
Now you can define which roles shouldn't be editable, removable or deletable in the admin panel.

In order to use this feature if you installed the 6.0 version you simply have to add this to the panel section in your config/laratrust.php file:

       /*
        |--------------------------------------------------------------------------
        | Add restriction to roles in the panel
        |--------------------------------------------------------------------------
        |
        | Configure which roles can not be editable, deletable and removable.
        | To add a role to the restriction, use name of the role here.
        |
        */
        'roles_restrictions' => [
            // The user won't be able to remove roles already assigend to users.
            'not_removable' => [],

            // The user won't be able to edit the role and the permissions assigned.
            'not_editable' => [],

            // The user won't be able to delete the role.
            'not_deletable' => [],
        ],