mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-31 23:19:36 +00:00
Add check if dir downloadable rpc (#381)
* Add check if dir downloadable rpc * modify format error
This commit is contained in:
@@ -675,6 +675,15 @@ class SeafileAPI(object):
|
||||
"""
|
||||
return '{"is_syncable":true}'
|
||||
|
||||
def is_dir_downloadable(self, repo_id, dir_path, user, repo_perm):
|
||||
"""
|
||||
Check if the permission of the dir is downloadable.
|
||||
{"is_downloadable": false, "undownloadable_path":"path"}
|
||||
- is_downloadable: true if the dir is downloadable, false if not.
|
||||
- undownloadable_path: the undownloadable path of the repo if the path is not downloadable.
|
||||
"""
|
||||
return '{"is_downloadable":true}'
|
||||
|
||||
# token
|
||||
def generate_repo_token(self, repo_id, username):
|
||||
"""Generate a token for sync a repo
|
||||
|
Reference in New Issue
Block a user