mirror of
https://github.com/Kozea/Radicale.git
synced 2025-09-15 20:36:55 +00:00
Clean support of public calendars, add support of private calendars
This commit is contained in:
parent
a28bd4a5fa
commit
f9836ab093
7 changed files with 42 additions and 13 deletions
|
@ -30,7 +30,7 @@ supported, but md5 is not (see ``htpasswd`` man page to understand why).
|
|||
import base64
|
||||
import hashlib
|
||||
|
||||
from radicale import config
|
||||
from radicale import acl, config
|
||||
|
||||
|
||||
FILENAME = config.get("acl", "htpasswd_filename")
|
||||
|
@ -63,6 +63,6 @@ def has_right(owner, user, password):
|
|||
for line in open(FILENAME).readlines():
|
||||
if line.strip():
|
||||
login, hash_value = line.strip().split(":")
|
||||
if login == user and (not owner or owner == user):
|
||||
if login == user and (owner in acl.PRIVATE_USERS or owner == user):
|
||||
return globals()["_%s" % ENCRYPTION](hash_value, password)
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue