mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 22:29:41 +08:00
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.
This commit is contained in:
parent
7c1a254812
commit
da289b51d0
@ -7,6 +7,7 @@ from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty, QTimer, py
|
|||||||
from PyQt6.QtNetwork import QNetworkRequest
|
from PyQt6.QtNetwork import QNetworkRequest
|
||||||
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING
|
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING
|
||||||
|
|
||||||
|
from UM.Decorators import deprecated
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
from UM.Message import Message
|
from UM.Message import Message
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
@ -319,12 +320,14 @@ class Account(QObject):
|
|||||||
|
|
||||||
self._authorization_service.deleteAuthData()
|
self._authorization_service.deleteAuthData()
|
||||||
|
|
||||||
|
@deprecated("Get permissions from the 'permissions' property", since = "5.2.0")
|
||||||
def updateAdditionalRight(self, **kwargs) -> None:
|
def updateAdditionalRight(self, **kwargs) -> None:
|
||||||
"""Update the additional rights of the account.
|
"""Update the additional rights of the account.
|
||||||
The argument(s) are the rights that need to be set"""
|
The argument(s) are the rights that need to be set"""
|
||||||
self._additional_rights.update(kwargs)
|
self._additional_rights.update(kwargs)
|
||||||
self.additionalRightsChanged.emit(self._additional_rights)
|
self.additionalRightsChanged.emit(self._additional_rights)
|
||||||
|
|
||||||
|
@deprecated("Get permissions from the 'permissions' property", since = "5.2.0")
|
||||||
@pyqtProperty("QVariantMap", notify = additionalRightsChanged)
|
@pyqtProperty("QVariantMap", notify = additionalRightsChanged)
|
||||||
def additionalRights(self) -> Dict[str, Any]:
|
def additionalRights(self) -> Dict[str, Any]:
|
||||||
"""A dictionary which can be queried for additional account rights."""
|
"""A dictionary which can be queried for additional account rights."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user