From da289b51d0c05ad1aa0042518e273c922bcf3bed Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 1 Aug 2022 10:33:56 +0200 Subject: [PATCH] Deprecate additionalRights property Consumers should now use the permissions system which gets the permissions from the account via a separate API call. Contributes to issue CURA-9220. --- cura/API/Account.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura/API/Account.py b/cura/API/Account.py index e4bf8102a9..2651037e9e 100644 --- a/cura/API/Account.py +++ b/cura/API/Account.py @@ -7,6 +7,7 @@ from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty, QTimer, py from PyQt6.QtNetwork import QNetworkRequest from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING +from UM.Decorators import deprecated from UM.Logger import Logger from UM.Message import Message from UM.i18n import i18nCatalog @@ -319,12 +320,14 @@ class Account(QObject): self._authorization_service.deleteAuthData() + @deprecated("Get permissions from the 'permissions' property", since = "5.2.0") def updateAdditionalRight(self, **kwargs) -> None: """Update the additional rights of the account. The argument(s) are the rights that need to be set""" self._additional_rights.update(kwargs) self.additionalRightsChanged.emit(self._additional_rights) + @deprecated("Get permissions from the 'permissions' property", since = "5.2.0") @pyqtProperty("QVariantMap", notify = additionalRightsChanged) def additionalRights(self) -> Dict[str, Any]: """A dictionary which can be queried for additional account rights."""