Skip to content

Commit

Permalink
Fix AttributeError: 'Authorization' object has no attribute 'log'
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Jan 13, 2025
1 parent 2dde11b commit c60bc18
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changes.d/660.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed crash when starting the UI Server if a user has invalid groups in their profile.
2 changes: 1 addition & 1 deletion cylc/uiserver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ def set_auth(self) -> Authorization:
getpass.getuser(),
user_auth,
site_auth,
self.log,
log=self.log,
)

def initialize_templates(self):
Expand Down
6 changes: 3 additions & 3 deletions cylc/uiserver/authorise.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ def __init__(
log,
):
self.owner_user_name: str = owner_user_name
self.owner_user_groups: List[str] = self._get_groups(
self.owner_user_name
)
self.log = log
self.owner_auth_conf: dict = owner_auth_conf
self.site_auth_config: dict = site_auth_conf
self.owner_user_groups: List[str] = self._get_groups(
self.owner_user_name
)
self.owner_dict = self.build_owner_site_auth_conf()

# lru_cache this method - see flake8-bugbear B019
Expand Down

0 comments on commit c60bc18

Please sign in to comment.