0

I am trying to use the group method hasPermission(permission_label, user). I found an example that is the following:

$group->hasPersmission('administer members', $user)

I would like to know what all the different permissions types are. In particular I want to be able to differentiate whether a user can edit or just view a type of content.

How do I a get a list of the different types of permissions?

Thanks,

Olivier

1 Answer 1

0

You can go to Admin -> Group -> Group Types -> [your group type]. On that page, click the Permissions tab. You can see all the permissions there. If you need to know the permissions string, you can inspect any checkbox for a given role/permission combo, and look at the name attribute. It will be something like admin[permission_label], where permission_label is the value you would pass as the first argument to $group->hasPermission().

1
  • Is there an API cll to get this list ? Apr 6, 2020 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.