@@ -622,6 +622,13 @@ def is_retire_ok(self):
622622 return perm ('Web Access' , self ._client .userid ) and perm ('Retire' ,
623623 self ._client .userid , self ._classname )
624624
625+ def is_restore_ok (self ):
626+ """ Is the user allowed to restore retired items of the current class?
627+ """
628+ perm = self ._db .security .hasPermission
629+ return perm ('Web Access' , self ._client .userid ) and perm ('Restore' ,
630+ self ._client .userid , self ._classname )
631+
625632 def is_view_ok (self ):
626633 """ Is the user allowed to View the current class?
627634 """
@@ -935,6 +942,13 @@ def is_retire_ok(self):
935942 return perm ('Web Access' , self ._client .userid ) and perm ('Retire' ,
936943 self ._client .userid , self ._classname , itemid = self ._nodeid )
937944
945+ def is_restore_ok (self ):
946+ """ Is the user allowed to restore this item?
947+ """
948+ perm = self ._db .security .hasPermission
949+ return perm ('Web Access' , self ._client .userid ) and perm ('Restore' ,
950+ self ._client .userid , self ._classname , itemid = self ._nodeid )
951+
938952 def is_view_ok (self ):
939953 """ Is the user allowed to View this item?
940954 """
0 commit comments