mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Allow finer control in rights plugin
New permissions: R: read collections without tag r: read collections with tag and included objects W: write and delete collections without tag w: write and delete collection with tag and included objects
This commit is contained in:
parent
72501c6e23
commit
0a492a00b1
6 changed files with 124 additions and 116 deletions
|
@ -23,5 +23,7 @@ from radicale import rights
|
|||
|
||||
|
||||
class Rights(rights.BaseRights):
|
||||
def authorized(self, user, path, permission):
|
||||
return path.strip("/") in ("tmp", "other")
|
||||
def authorized(self, user, path, permissions):
|
||||
if path.strip("/") not in ("tmp", "other"):
|
||||
return ""
|
||||
return rights.intersect_permissions(permissions)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue