1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

Set calendars always personal with authentication activated

This commit is contained in:
Guillaume Ayoub 2011-05-17 00:10:36 +02:00
parent 7c0e9686a8
commit ca9c148705
5 changed files with 3 additions and 12 deletions

View file

@ -34,7 +34,6 @@ from radicale import config
FILENAME = config.get("acl", "htpasswd_filename")
PERSONAL = config.getboolean("acl", "personal")
ENCRYPTION = config.get("acl", "htpasswd_encryption")
@ -64,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 PERSONAL or user == owner):
if login == user and (not owner or owner == user):
return globals()["_%s" % ENCRYPTION](hash_value, password)
return False