Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.3 KB

File metadata and controls

40 lines (32 loc) · 1.3 KB

Development Notes

Stuff that should probably get documented at some point.

Permission Model

Write Permissions(user, file)

Write permissions allow users to update the data of a file.

  1. Let asn be the file's ASN
  2. Let asn write roles be the write roles configured in the configuration corresponding to the asn's folder.
  3. Let user roles be the user's roles
  4. If the asn write roles include one or more roles from the user roles
    1. Return true
  5. If the file's additional write roles include one or more roles from the user roles
    1. Return true
  6. Return false

Read Permissions(user, file)

Read permissions allow users to see files without updating them.

  1. Let asn be the file's ASN
  2. Let asn read roles be the read roles configured in the configuration corresponding to the asn's folder.
  3. Let user roles be the user's roles
  4. If user has write permissions for file
    1. Return true
  5. If the file's tags include one or more of the publicTags configured in the configuration
    1. Return true
  6. If the asn read roles include one or more roles from the user roles
    1. Return true
  7. If the file's additional read roles include one or more roles from the user roles
    1. Return true
  8. Return false