From 5169db2353242568285bbc3f80173ddbe00a75ab Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 4 Sep 2024 15:28:06 +0200 Subject: [PATCH] Directly update permissions after login. Otherwise you have to wait until the access token refreshes, and are in a weird state in between that time where you _are_ logged in, and we even have the subscription-level, but the permission-list are empty. Now you just have to wait until the permissions return from the server after login, which shouldn't be a problem unless our users are speedrunners. fixes internal ticket CURA-12076 --- cura/API/Account.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/API/Account.py b/cura/API/Account.py index d126a52d605..2fc5b8de6ca 100644 --- a/cura/API/Account.py +++ b/cura/API/Account.py @@ -232,6 +232,7 @@ def _onLoginStateChanged(self, logged_in: bool = False, error_message: Optional[ def _onProfileChanged(self, profile: Optional[UserProfile]) -> None: self._user_profile = profile + self._updatePermissions() self.userProfileChanged.emit() def _sync(self) -> None: