Clean support of public calendars, add support of private calendars
This commit is contained in:
@@ -26,7 +26,7 @@ Authentication based on the ``python-ldap`` module
|
||||
"""
|
||||
|
||||
import ldap
|
||||
from radicale import config, log
|
||||
from radicale import acl, config, log
|
||||
|
||||
|
||||
BASE = config.get("acl", "ldap_base")
|
||||
@@ -38,8 +38,8 @@ PASSWORD = config.get("acl", "ldap_password")
|
||||
|
||||
def has_right(owner, user, password):
|
||||
"""Check if ``user``/``password`` couple is valid."""
|
||||
if not user or (owner and user != owner):
|
||||
# No user given, or owner is set and is not user, forbidden
|
||||
if not user or (owner not in acl.PRIVATE_USERS and user != owner):
|
||||
# No user given, or owner is not private and is not user, forbidden
|
||||
return False
|
||||
|
||||
if BINDDN and PASSWORD:
|
||||
|
||||
Reference in New Issue
Block a user