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
This commit is contained in:
Remco Burema 2024-09-04 15:28:06 +02:00
parent f8aa923ce0
commit 5169db2353

View File

@ -232,6 +232,7 @@ class Account(QObject):
def _onProfileChanged(self, profile: Optional[UserProfile]) -> None: def _onProfileChanged(self, profile: Optional[UserProfile]) -> None:
self._user_profile = profile self._user_profile = profile
self._updatePermissions()
self.userProfileChanged.emit() self.userProfileChanged.emit()
def _sync(self) -> None: def _sync(self) -> None: