mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-31 23:19:36 +00:00
Repo can be set 'read-only' or 'normal' status.
Return 'status' in get_repo(s) apis.
This commit is contained in:
@@ -1046,3 +1046,12 @@ class SeafServerThreadedRpcClient(ccnet.RpcClientBase):
|
||||
@searpc_func("string", ["string", "string", "string", "int"])
|
||||
def convert_repo_path(repo_id, path, user, is_org):
|
||||
pass
|
||||
|
||||
# repo status
|
||||
@searpc_func("int", ["string", "int"])
|
||||
def set_repo_status(repo_id, status):
|
||||
pass
|
||||
|
||||
@searpc_func("int", ["string"])
|
||||
def get_repo_status(repo_id):
|
||||
pass
|
||||
|
@@ -14,6 +14,9 @@ All paths in parameters can be in absolute path format (like '/test') or
|
||||
relative path format (like 'test'). The API can handle both formats.
|
||||
"""
|
||||
|
||||
REPO_STATUS_NORMAL = 0
|
||||
REPO_STATUS_READ_ONLY = 1
|
||||
|
||||
class SeafileAPI(object):
|
||||
|
||||
def __init__(self):
|
||||
@@ -169,6 +172,12 @@ class SeafileAPI(object):
|
||||
def get_org_id_by_repo_id (self, repo_id):
|
||||
return seafserv_threaded_rpc.get_org_id_by_repo_id(repo_id)
|
||||
|
||||
def set_repo_status (self, repo_id, status):
|
||||
return seafserv_threaded_rpc.set_repo_status(repo_id, status)
|
||||
|
||||
def get_repo_status (self, repo_id):
|
||||
return seafserv_threaded_rpc.get_repo_status(repo_id)
|
||||
|
||||
# File property and dir listing
|
||||
|
||||
def is_valid_filename(self, repo_id, filename):
|
||||
|
Reference in New Issue
Block a user