Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Groups: Users, Editors, Moderators // The number of groups must be dynamic
- // These are for the purpose of example,
- // the number of user roles in each group will be dynamic
- 2. Users:
- 1. Unregistered(Users)
- 2. Registered(Users)
- 3. Writer(Editors)
- 4. Reviewer(Editors)
- 5. Publisher(Editors)
- 6. Post Moder(Moderators)
- 7. Topic Moder(Moderators)
- 8. Forum Moder (Moderators)
- // Each will be a entry in the SplQueue containing directly the privileges of the extended group
- 3. Relations in Role level:
- 1. Unregistered -> None
- 2. Registered -> Unregistered
- 3. Writer -> Registered -> Unregistered
- 4. Reviewer -> Writer -> ... -> ...
- 5. Publisher -> Reviewer -> Writer -> ... -> ...
- 6. Post moder -> Registered -> Unregistered
- 7. Topic Moder -> Post Moder -> ... -> ...
- 8. Forum Moder -> Topic Moder -> Post Moder -> ... -> ...
- // Groups are having privilegies as well
- // But for the application the group privileges are used when a Loose Security is used
- // ie. The comparison is only for the group rights, where tight security is used the comparison is
- // done recursively by:
- /* 1. checking the group privs */
- /* (if has access) */
- /* 2. check user role */
- /* (if does not) */
- /* 3. Iterate the parents to see if any of them has access */
- 4. Relations between groups:
- Users
- / \
- / \
- Editors Moderators
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement