How does it work?

How does it work?

Looks like some people have questions and also that the information I provide on the main page about how the permissions should be configured are quite vague.

Well you are right about being vague... so I challenge you to give me pastie.org or similar links for the other pemission systems not described here!

Under the hood

Atm I handle 3 different "permission" system: PEX, Vault and bPermissions.

PEX

  • If we have generalPermChanges = true than we also hand over the world for permission checking, otherwise not
  • If the user is still in the oldGroup we need to upgrade, otherwise we need to downgrade
  • If we need to downgrade I flip the groups of oldGroup and newGroup around
  • If we have generalPermChanges = true than we also hand over the world for permission changing, otherwise not
  • We remove the oldGroup and add the newGroup

The reason why you need to explicity disable Vault when using PEX is because PEX will return a true if I check for a group which is a parent of a child. So if you have Group A and Group B and Group B inherits from Group A and you are in Group B, checking for Group A will return true. And I work around that.

Vault

  • If we have generalPermChanges = true than we also hand over the world for permission checking, otherwise not
  • If the user is still in the oldGroup we need to upgrade, otherwise we need to downgrade
  • If we need to downgrade I flip the groups of oldGroup and newGroup around
  • If we have generalPermChanges = true than we also hand over the world for permission changing, otherwise not
  • We remove the oldGroup and add the newGroup

No special handling bein done.. so if you are using a permission manager which is not PEX or bPermission and see strange results let me know.

bPermissions

  • If we have generalPermChanges = true than we also hand over the world for permission checking, otherwise not
  • If the user is in the newGroup we need to downgrade, otherwise we need to upgrade
  • If we have generalPermChanges = true than we also hand over the world for permission changing, otherwise not
  • If we need to upgrade we add the newGroup
  • If we need to downgrade we remove the newGroup

This special handling is needed because bPermissions allows multigroup membership.

Permission Examples

Well that one is really hard... will need some time for this.. as I would also like to post some general best practice about it. Perhaps somebody else has an idea?

PEX

bPermissions


Comments

Posts Quoted:
Reply
Clear All Quotes