Add User parameter to database_delete_sharing method

In line with the changes made to files.py. Passes the user name as an additional argument so a storage hook can know who deleted a share
This commit is contained in:
Nils Brederlow
2026-04-07 13:22:40 +02:00
committed by GitHub
parent 409a1af918
commit 658cfef7ed

View File

@@ -371,12 +371,13 @@ class Sharing(sharing.BaseSharing):
def database_delete_sharing(self,
ShareType: str,
PathOrToken: str) -> dict:
PathOrToken: str,
User: str) -> dict:
""" delete sharing """
if logger.isEnabledFor(logging.DEBUG):
logger.debug("TRACE/sharing/%s/delete: PathOrToken=%r", ShareType, PathOrToken)
with self._storage.acquire_lock("w", path=self._sharing_db_file):
with self._storage.acquire_lock("w", User, path=self._sharing_db_file):
# lookup token
found = False
index = 0