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

Rebase rights/from_file.py.

Apply proposed/asked changes.
This commit is contained in:
Dipl. Ing. Péter Varkoly 2024-08-26 11:21:53 +02:00
parent 19e5972b4f
commit 5167f12624
4 changed files with 45 additions and 57 deletions

View file

@ -250,11 +250,12 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
authorization.encode("ascii"))).split(":", 1)
user = self._auth.login(login, password) or "" if login else ""
try:
logger.debug("Groups %r",",".join(self._auth._ldap_groups))
self._rights._user_groups = self._auth._ldap_groups
except AttributeError:
pass
if self.configuration.get("auth", "type") == "ldap":
try:
logger.debug("Groups %r",",".join(self._auth._ldap_groups))
self._rights._user_groups = self._auth._ldap_groups
except AttributeError:
pass
if user and login == user:
logger.info("Successful login: %r", user)
elif user: