mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-10 18:40:53 +00:00
Set constant values after defining functions in htpasswd module.
This commit is contained in:
parent
6fd85fe6b6
commit
c7820b87e0
1 changed files with 4 additions and 4 deletions
|
@ -33,10 +33,6 @@ import hashlib
|
|||
from radicale import config
|
||||
|
||||
|
||||
FILENAME = config.get("acl", "filename")
|
||||
CHECK_PASSWORD = locals()["_%s" % config.get("acl", "encryption")]
|
||||
|
||||
|
||||
def _plain(hash_value, password):
|
||||
"""Check if ``hash_value`` and ``password`` match using plain method."""
|
||||
return hash_value == password
|
||||
|
@ -66,3 +62,7 @@ def has_right(user, password):
|
|||
if login == user:
|
||||
return CHECK_PASSWORD(hash_value, password)
|
||||
return False
|
||||
|
||||
|
||||
FILENAME = config.get("acl", "filename")
|
||||
CHECK_PASSWORD = locals()["_%s" % config.get("acl", "encryption")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue