Welcome Guest, Not a member yet? Register   Sign In
Myth Auth - Working with groups and permissions
#6

I've looked at the filters but it seems to only work with groups not users.

PHP Code:
$authorize service('authorization');
$authorize->inGroup('teste'1), // check if user 1 is in the 'teste' group
$authorize->hasPermission('users-add'1), //checks if group 1 has 'users-add' permission
$authorize->doesUserHavePermission(1,'users-add'), //check if there is any user with 'users-add' permission in group 1 



I didn't find anything specific to work with users, but in the database there is a table called "auth_users_permissions"

I will keep doing some tests
Reply


Messages In This Thread
RE: Myth Auth - Working with groups and permissions - by rafinhaa - 06-23-2021, 08:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB