[FIX]Radicale Odoo Right : we must take care of authenticated users alongside paths
This commit is contained in:
parent
258ccac379
commit
274bc29313
@ -25,7 +25,12 @@ class Rights(BaseRights):
|
|||||||
""" BaseRights implementation for Odoo Radicale """
|
""" BaseRights implementation for Odoo Radicale """
|
||||||
|
|
||||||
def authorized(self, user, path, permission):
|
def authorized(self, user, path, permission):
|
||||||
return permission == 'r'
|
""" Authorized only readonly for authenticated users on their path """
|
||||||
|
if not user:
|
||||||
def authorized_item(self, user, path, permission):
|
return False
|
||||||
|
if path == '/':
|
||||||
|
return True
|
||||||
|
path = path.strip('/').split('/')
|
||||||
|
if user != path[0]:
|
||||||
|
return False
|
||||||
return permission == 'r'
|
return permission == 'r'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user