Skip to content

Permission System

There are two user roles in the system: Admin and Normal User ("users" are like "buckets" to some extent).
A user have all permissions of the files and subpaths under its path (starting with /<user>/).
Admins have all permissions of all files and paths.

directory path ends with / and file does not end with /.

Peers

The user can have multiple peer users. The peer user can have read or write access to the user's path, depending on the access level set when adding the peer user.
The peer user can list the files under the user's path.
If the peer user only has read access (peer-r), then the peer user can only GET files under the user's path.
If the peer user has write access (peer-w), then the peer user can GET/PUT/POST/DELETE files under the user's path.

Ownership

A file is owned by the user who created it, may not necessarily be the user under whose path the file is stored (admin/write-peer can create files under other user's path).

Non-peer and public access

NOTE: below discussion is based on the assumption that the user is not a peer of the path owner, or is guest user (public access).

File access with GET permission

File access

For accessing file content, the user must have GET permission of the file, which is determined by the permission field of both the path-owner and the file.

There are four types of permissions: unset, public, protected, private. Non-admin users can access files based on:

  • If the file is public, then all users can access it.
  • If the file is protected, then only the logged-in user can access it.
  • If the file is private, then only the owner/path-owner can access it.
  • If the file is unset, then the file's permission is inherited from the path-owner's permission.
  • If both the path-owner and the file have unset permission, then the file is public.

File creation with PUT/POST permission

PUT/POST permission is not allowed for non-peer users.

File DELETE and moving permissions

  • Non-login user don't have DELETE/move permission.
  • Every user can have DELETE permission that they own.
  • User can move files if they have write access to the destination path.

Directory-listing

Directory-listing is not allowed for these users.

Summary

PermissionAdminUserPeer-rPeer-wOwner (not the user)Non-peer user / Guest
GETYesYesYesYesYesDepends on file
PUT/POSTYesYesNoYesYesNo
DELETE fileYesYesNoYesYesNo
DELETE pathYesYesNoYesN/ANo
moveYesYesNoYesDep. on destinationNo
listYesYesYesYesNo if not peerNo

Capitilized methods are HTTP methods, N/A means not applicable.

INFO

Peer relations can be overridden by single directory permission settings, please refer to the Single Directory Configuration document for more details.