Check permissions before showing abort/pause/delete context buttons

The user needs permissions to do these things, so don't show them if the user can't use them.

Contributes to issue CURA-9220.
This commit is contained in:
Ghostkeeper 2022-07-25 17:34:34 +02:00
parent 8871fd6224
commit 5eb340e3f0
No known key found for this signature in database
GPG key ID: FFBC62A75981ED70
2 changed files with 78 additions and 19 deletions

View file

@ -204,14 +204,14 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice):
Whether this user can change things about print jobs made by other
people.
"""
return False
return True
@pyqtProperty(bool, constant = True)
def canWriteOwnPrintJobs(self) -> bool:
"""
Whether this user can change things about print jobs made by themself.
"""
return False
return True
@pyqtSlot(name="openPrintJobControlPanel")
def openPrintJobControlPanel(self) -> None: