wsgidav.lock_man.lock_manager.LockManager

class wsgidav.lock_man.lock_manager.LockManager(storage)[source]

Bases: object

Implements locking functionality using a custom storage layer.

LockManager.acquire(*, url, lock_type, ...)

Check for permissions and acquire a lock.

LockManager.check_write_permission(*, url, ...)

Check, if <principal> can modify <url>, otherwise raise HTTP_LOCKED.

LockManager.get_indirect_url_lock_list(url, *)

Return a list of valid lockDicts, that protect <path> directly or indirectly.

LockManager.get_lock(token, *[, key])

Return lock_dict, or None, if not found or invalid.

LockManager.get_url_lock_list(url, *[, ...])

Return list of lock_dict, if <url> is protected by at least one direct, valid lock.

LockManager.is_token_locked_by_user(token, ...)

Return True, if <token> exists, is valid, and bound to <principal>.

LockManager.is_url_locked(url)

Return True, if url is directly locked.

LockManager.is_url_locked_by_token(url, ...)

Check, if url (or any of it's parents) is locked by lock_token.

LockManager.refresh(token, *[, timeout])

Set new timeout for lock, if existing and valid.

LockManager.release(token)

Delete lock.

LockManager.remove_all_locks_from_url(url, *)