Apply suggestions of mypy
This commit is contained in:
@@ -57,6 +57,8 @@ def intersect(a: str, b: str) -> str:
|
||||
|
||||
class BaseRights:
|
||||
|
||||
_user_groups: set[str] = set([])
|
||||
|
||||
def __init__(self, configuration: "config.Configuration") -> None:
|
||||
"""Initialize BaseRights.
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class Rights(rights.BaseRights):
|
||||
collection_pattern = rights_config.get(section, "collection")
|
||||
allowed_groups = rights_config.get(section, "groups", fallback="").split(",")
|
||||
try:
|
||||
group_match = self._user_groups.intersection(allowed_groups) > 0
|
||||
group_match = len(self._user_groups.intersection(allowed_groups)) > 0
|
||||
except Exception:
|
||||
pass
|
||||
# Use empty format() for harmonized handling of curly braces
|
||||
|
||||
Reference in New Issue
Block a user