Why is it possible to allow actions for sub-roles, even if one didn't has the permission himself?

Re: Why is it possible to allow actions for sub-roles, even if one didn't has the permission himself?

by Tim Hunt -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Note that, if a use has one role which PROHIBIT's a capability, that that user can never have that capability themselves.

An example of why you need to be able to assign a role that has a capability you don't have:

  • Student has mod/quiz:attempt.
  • Teacher does not have mod/quiz:attempt (but does have mod/quiz:preview).
  • Teacher needs to be able to assign Student.

There is control of which roles can assign which other roles built into the roles system. When you go to the define roles page, look at the tabs across the top.

Average of ratings: Useful (1)