Esempio n. 1
0
 def mayBackToPublished(self):
     '''Here, the user need the Manage portal permission. Indeed, this is
        not a normal case and only the Manager should be able to do that.'''
     res = False
     # We check if the current user has the Manage portal permission
     # or we check that the MeetingItem is in 'itempublished'.
     # In this case, we just put the item back to 'itempublished' and the
     # 'meetingItem.doCorrect' after_script will 'adviceBackToPublished'
     # every contained advice.
     if checkPermission(ManagePortal, self.context) or \
        (self.context.getMeetingItem().queryState() == 'itempublished'):
         res = True
     return res
Esempio n. 2
0
 def mayBackToCreated(self):
     res = False
     # We check if the current user has the Review portal content permission
     if checkPermission(ReviewPortalContent, self.context):
         res = True
     return res