mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-07 18:30:54 +00:00
More type hints
This commit is contained in:
parent
11f7559ef3
commit
c93d7b8715
51 changed files with 1374 additions and 957 deletions
|
@ -21,15 +21,16 @@ calendars and address books.
|
|||
|
||||
"""
|
||||
|
||||
from radicale import pathutils, rights
|
||||
from radicale import config, pathutils, rights
|
||||
|
||||
|
||||
class Rights(rights.BaseRights):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def __init__(self, configuration: config.Configuration) -> None:
|
||||
super().__init__(configuration)
|
||||
self._verify_user = self.configuration.get("auth", "type") != "none"
|
||||
|
||||
def authorization(self, user, path):
|
||||
def authorization(self, user: str, path: str) -> str:
|
||||
if self._verify_user and not user:
|
||||
return ""
|
||||
sane_path = pathutils.strip_path(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue