mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 08:55:54 +08:00
Merge pull request #19211 from Ultimaker/CURA-11870_update_permissions_on_token_refresh
Only request permissions when token changed
This commit is contained in:
commit
b0f5fee933
@ -115,15 +115,15 @@ class Account(QObject):
|
||||
self._update_timer.setSingleShot(True)
|
||||
self._update_timer.timeout.connect(self.sync)
|
||||
|
||||
self._sync_services: Dict[str, int] = {}
|
||||
"""contains entries "service_name" : SyncState"""
|
||||
self.syncRequested.connect(self._updatePermissions)
|
||||
self._sync_services: Dict[str, int] = {}
|
||||
|
||||
def initialize(self) -> None:
|
||||
self._authorization_service.initialize(self._application.getPreferences())
|
||||
self._authorization_service.onAuthStateChanged.connect(self._onLoginStateChanged)
|
||||
self._authorization_service.onAuthenticationError.connect(self._onLoginStateChanged)
|
||||
self._authorization_service.accessTokenChanged.connect(self._onAccessTokenChanged)
|
||||
self._authorization_service.accessTokenChanged.connect(self._updatePermissions)
|
||||
self._authorization_service.loadAuthDataFromPreferences()
|
||||
|
||||
@pyqtProperty(int, notify=syncStateChanged)
|
||||
|
Loading…
x
Reference in New Issue
Block a user