From debc83cda57ee77edd1619d16162ecd96cd09fe5 Mon Sep 17 00:00:00 2001 From: feiniks <36756310+feiniks@users.noreply.github.com> Date: Wed, 22 Jul 2020 16:13:21 +0800 Subject: [PATCH] Add check if dir downloadable rpc (#381) * Add check if dir downloadable rpc * modify format error --- python/seaserv/api.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/seaserv/api.py b/python/seaserv/api.py index ac05e37..db2fc6d 100644 --- a/python/seaserv/api.py +++ b/python/seaserv/api.py @@ -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