Advertisement
Guest User

Group-Role Based ACL

a guest
Jul 18th, 2013
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. 1. Groups: Users, Editors, Moderators // The number of groups must be dynamic
  2.  
  3. // These are for the purpose of example,
  4. // the number of user roles in each group will be dynamic
  5. 2. Users:
  6. 1. Unregistered(Users)
  7. 2. Registered(Users)
  8. 3. Writer(Editors)
  9. 4. Reviewer(Editors)
  10. 5. Publisher(Editors)
  11. 6. Post Moder(Moderators)
  12. 7. Topic Moder(Moderators)
  13. 8. Forum Moder (Moderators)
  14.  
  15. // Each will be a entry in the SplQueue containing directly the privileges of the extended group
  16. 3. Relations in Role level:
  17. 1. Unregistered -> None
  18. 2. Registered -> Unregistered
  19. 3. Writer -> Registered -> Unregistered
  20. 4. Reviewer -> Writer -> ... -> ...
  21. 5. Publisher -> Reviewer -> Writer -> ... -> ...
  22. 6. Post moder -> Registered -> Unregistered
  23. 7. Topic Moder -> Post Moder -> ... -> ...
  24. 8. Forum Moder -> Topic Moder -> Post Moder -> ... -> ...
  25.  
  26.  
  27. // Groups are having privilegies as well
  28. // But for the application the group privileges are used when a Loose Security is used
  29. // ie. The comparison is only for the group rights, where tight security is used the comparison is
  30. // done recursively by:
  31. /* 1. checking the group privs */
  32. /* (if has access) */
  33. /* 2. check user role */
  34. /* (if does not) */
  35. /* 3. Iterate the parents to see if any of them has access */
  36. 4. Relations between groups:
  37.  
  38. Users
  39. / \
  40. / \
  41. Editors Moderators
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement