Groups and access rights - mattiasrunge/MURRiX GitHub Wiki
Node types and access requirements
album Must have explicit rights
location Must have explicit rights
person Must have explicit rights
file Should not have explicit rights
logentry Should not have explicit rights
comment Should not have explicit rights
mediamark Should not have explicit rights
tag Should not have explicit rights Special case: readable for all, only type will be checked
group Should not have explicit rights Special case: users connected with role[user_admin] will be granted admin rights
user Should not have explicit rights Special case: admin rights to own (signed in user)
Creation of new nodes
album Anyone but the anonymous user allowed
location Anyone but the anonymous user allowed
person Anyone but the anonymous user allowed
file If admin on parent node (create file links to parent)
logentry If admin on parent node (create file links to parent)
comment If admin on parent node (create comment links to user and parent), anonymous not allowed to edit/delete even if creator
mediamark If admin on parent node and read on "person" node to mark (create mediamark links to file and "person" node)
tag If admin on parent node (create tag links to parent), do not create new if existing is found
group Only admin user allowed to create
user Only admin user allowed to create
Access propagation through links
<node_type_down>_<specific type>
creator person_creator (Node up read rights inherited) Equal relation
father person_father (Node up read rights inherited) Equal relation
mother person_mother (Node up read rights inherited) Equal relation
partner person_partner (Node up read rights inherited) Equal relation
event event (Node up * rights inherited) Owning relation (up owns down)
birth event_birth (Node up * rights inherited) Owning relation (up owns down)
death event_death (Node up * rights inherited) Owning relation (up owns down)
engagement event_engagement (Node up * rights inherited) Owning relation (up owns down)
marriage event_marriage (Node up * rights inherited) Owning relation (up owns down)
file file (Node up * rights inherited) Owning relation (up owns down)
profilePicture file_profile (Node up read rights inherited) Equal relation
media *_related (Node up read rights inherited) Equal relation
mediamark mediamark (Node up * rights inherited) Owning relation (up owns down)
location location (Node up read rights inherited) Equal relation
home location_home (Node up * rights inherited) Owning relation (up owns down)
logentry logentry (Node up * rights inherited) Owning relation (up owns down)
tag tag (All tags are readable?)
member user_member (Node up * rights inherited) Owning relation (up owns down)
user_admin (Node up * rights inherited) Owning relation (up owns down)
comment (Node up * rights inherited) Owning relation (up owns down)
Flow: Create new album, location or person node
- Check that the current user is NOT the anonymous user => if not move on
- Create the new node
- Grant the creating users default group admin rights on the new node
Flow: Create new file or logentry node under a owning node relation role
- Check if the current user has admin rights on the supplied owning node => if not disallow
- Create the new node
- Create a link to the owning node using the supplied relation role
Flow: Create new comment under a owning node relation
- Check if the current user has read rights on the owning node => if not disallow
- Create the new node
- Create a link to the owning node using the supplied relation role
- If the current user is not the anonymous user create a link, using the supplied relation role, toward the creating user
Flow: Create new mediamark under a file node (owning node) and connect to person/location/etc (item node)
- Check if the current user has admin rights on the owning node and read rights on the item node => if not disallow
- Create the new mediamark node
- Create a link to the owning node using the mediamark role
- Create a link to the item node using the mediamark role
Flow: Tag a node (owning node)
- Check if the current user has admin rights on the owning node => if not disallow
- Check if a tag node with the same name already exists => if not create new tag nod
- Create a link to the owning node using the tag relation role
Flow: Create group node
- Check if the current user is the admin user => if not disallow
- Create the new group node
Flow: Create user node
- Check if the current user is the admin user => if not disallow
- Create the new user node
Flow: On read access requested
- Check explicit read or admin rights on node
- Fetch all links
- Group links in Owning relation and Equal relation lists
- Filter the Owning relation list to only contain links where the remote node is up
- Check if any of the nodes in the Owning relation group grants read or admin rights => if not move on
- Check if any of the nodes in the Equal relation list grants read rights => if not disallow
- Allow access
Flow: On admin access requested
- Check explicit admin rights on node
- Fetch all links
- Filter out Owning relation links
- Filter the Owning relation list to only contain links where the remote node is up
- Check if any of the nodes in the Owning relation group grants admin rights => if not disallow
- Allow access