implemented to change folder access level chacl
command.
This commit is contained in:
@ -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/"
|
||||
|
Reference in New Issue
Block a user