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

Use ACL Methods in Controller

Open popovicieduard opened this issue 4 years ago • 0 comments

is there a way of checking the user roles inside the controller ?

I know that I can get the roles from a user with user.getRoles but methods like the one below would look nicer

user.is(role.slug){
//do stuff
}

popovicieduard avatar Mar 17 '20 14:03 popovicieduard