Skip to content

Commit

Permalink
Add list permission
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Oct 29, 2024
1 parent 873b595 commit 9442b8d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/artifact-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ Permissions can be set both at the artifact level and the workspace level. In th

**Permission Levels:**

- **n**: No access to the artifact.
- **l**: List-only access (includes `list`).
- **l+**: List and create access (includes `list`, `create`, `commit`).
- **r**: Read-only access (includes `read`, `get_file`, `list_files`, `list`).
- **r+**: Read and create access (includes `read`, `get_file`, `list_files`, `list`, `put_file`, `create`, `commit`).
- **rw**: Read and write access (includes `read`, `get_file`, `list_files`, `list`, `edit`, `commit`, `put_file`, `remove_file`).
Expand Down
2 changes: 1 addition & 1 deletion hypha/VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.20.38.post18"
"version": "0.20.38.post19"
}
4 changes: 4 additions & 0 deletions hypha/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ def _expand_permission(self, permission):
if isinstance(permission, str):
if permission == "n":
return []
elif permission == "l":
return ["list"]
elif permission == "l+":
return ["list", "create", "commit"]
elif permission == "r":
return ["read", "get_file", "list_files", "list"]
elif permission == "r+":
Expand Down

0 comments on commit 9442b8d

Please sign in to comment.