1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-08-31 23:19:36 +00:00

Add rpc get_shared_repo_by_path().

This commit is contained in:
cuihaikuo
2017-10-31 11:02:52 +08:00
parent e195ab4178
commit 1ed203814e
8 changed files with 121 additions and 0 deletions

View File

@@ -566,6 +566,10 @@ class SeafServerThreadedRpcClient(ccnet.RpcClientBase):
def update_share_subdir_perm_for_user(repo_id, path, owner, share_user, permission):
pass
@searpc_func("object", ["string", "string", "string", "int"])
def get_shared_repo_by_path(repo_id, path, shared_to, is_org):
pass
@searpc_func("objlist", ["int", "string", "string", "int", "int"])
def seafile_list_org_share_repos(org_id, email, query_col, start, limit):
pass

View File

@@ -381,6 +381,13 @@ class SeafileAPI(object):
return seafserv_threaded_rpc.update_share_subdir_perm_for_user(repo_id, path, owner,
share_user, permission)
def get_shared_repo_by_path(self, repo_id, path, shared_to, is_org=False):
"""
If path is not NULL, 'repo_id' represents for the repo we want,
otherwise, 'repo_id' represents for the origin repo, return virtual repo
"""
return seafserv_threaded_rpc.get_shared_repo_by_path(repo_id, path, shared_to, 1 if is_org else 0)
def get_share_out_repo_list(self, username, start, limit):
"""
Get repo list shared by this user.