Skip to content

Commit

Permalink
Merge pull request #265 from open-dynaMIX/extend_mixin
Browse files Browse the repository at this point in the history
fix: Move methods from `ManabiFileResource` to `ManabiFileResourceMixin`
  • Loading branch information
open-dynaMIX authored Feb 28, 2024
2 parents d339f57 + acc3193 commit 6c2d9f0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions manabi/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ class ManabiFileResourceMixin:
_token: Token
_cb_config: Optional[CallbackHookConfig]

def delete(self):
raise DAVError(HTTP_FORBIDDEN)

def copy_move_single(self, dest_path, is_move):
raise DAVError(HTTP_FORBIDDEN)

def support_recursive_move(self, dest_path):
return False

def move_recursive(self, dest_path):
raise DAVError(HTTP_FORBIDDEN)

def _get_token_and_config(self):
token = self._token
config = self._cb_config
Expand Down Expand Up @@ -117,18 +129,6 @@ def __init__(
self._token = environ["manabi.token"]
super().__init__(path, environ, file_path)

def delete(self):
raise DAVError(HTTP_FORBIDDEN)

def copy_move_single(self, dest_path, is_move):
raise DAVError(HTTP_FORBIDDEN)

def support_recursive_move(self, dest_path):
return False

def move_recursive(self, dest_path):
raise DAVError(HTTP_FORBIDDEN)

def begin_write(self, *, content_type=None):
self.process_pre_write_hooks()
return super().begin_write(content_type=content_type)
Expand Down

0 comments on commit 6c2d9f0

Please sign in to comment.