implemented to change folder access level chacl command.

This commit is contained in:
2023-05-11 17:00:14 +09:00
parent 995e4cc467
commit b028c86b20
8 changed files with 80 additions and 12 deletions

View File

@ -81,6 +81,19 @@ class FolderApi(BaseApi):
raise UnauthorizedException("Password is incorrect.")
return True
def acl(self, id: str, access_level: int, recursive: bool, password: str | None) -> bool:
# print(self.__class__.__name__ + "::" + sys._getframe().f_code.co_name)
url = self.ENTRYPOINT + id + "/acl/"
data: dict[str, int | str] = {"access_level": access_level}
if password is not None:
data.update({"password": password})
if recursive is True:
data.update({"lower": 1})
token_check(self.connection)
response = self.connection.post(url, data=data)
self._raise_response_error(response)
return True
def move(self, folder: FolderSimple, folder_id: str) -> bool:
# print(self.__class__.__name__ + "::" + sys._getframe().f_code.co_name)
url = self.ENTRYPOINT + folder.id + "/move/"