예제 #1
0
 def _checkProtection(self):
     if not any(
             self._notify("isPluginAdmin", {
                 "user": self._getUser(),
                 "plugins": "any"
             }) +
             self._notify("isPluginTypeAdmin", {"user": self._getUser()})):
         RHDisplayBaseProtected._checkProtection(self)
예제 #2
0
 def _checkProtection( self ):
     if isinstance(self._file.getOwner(), Reviewing):
         selfcopy = copy(self)
         selfcopy._target = self._file.getOwner().getContribution()
         if not (RCContributionPaperReviewingStaff.hasRights(selfcopy) or \
             selfcopy._target.canUserSubmit(self.getAW().getUser()) or \
             self._target.canModify( self.getAW() )):
             raise AccessError()
     else:
         RHDisplayBaseProtected._checkProtection( self )
예제 #3
0
 def _checkProtection( self ):
     if isinstance(self._file.getOwner(), Reviewing):
         selfcopy = copy(self)
         selfcopy._target = self._file.getOwner().getContribution()
         if not (RCContributionPaperReviewingStaff.hasRights(selfcopy) or \
             selfcopy._target.canUserSubmit(self.getAW().getUser()) or \
             self._target.canModify( self.getAW() )):
             raise AccessError()
     else:
         RHDisplayBaseProtected._checkProtection( self )
예제 #4
0
    def _checkProtection(self):
        if isinstance(self._file.getOwner(), Reviewing):
            selfcopy = copy(self)
            selfcopy._target = self._file.getOwner().getContribution()
            if not (RCContributionPaperReviewingStaff.hasRights(selfcopy) or \
                selfcopy._target.canUserSubmit(self.getAW().getUser()) or \
                self._target.canModify( self.getAW() )):
                raise AccessError()
        elif isinstance(self._file.getOwner(), Registrant) and \
             not self._file.getOwner().canUserModify(self.getAW().getUser()):
            raise AccessError(_("Access to this resource is forbidden."))

        else:
            RHDisplayBaseProtected._checkProtection(self)
예제 #5
0
    def _checkProtection( self ):
        if isinstance(self._file.getOwner(), Reviewing):
            selfcopy = copy(self)
            selfcopy._target = self._file.getOwner().getContribution()
            if not (RCContributionPaperReviewingStaff.hasRights(selfcopy) or \
                selfcopy._target.canUserSubmit(self.getAW().getUser()) or \
                self._target.canModify( self.getAW() )):
                raise AccessError()
        elif isinstance(self._file.getOwner(), Registrant) and \
             not self._file.getOwner().canUserModify(self.getAW().getUser()):
            raise AccessError(_("Access to this resource is forbidden."))

        else:
            RHDisplayBaseProtected._checkProtection( self )
예제 #6
0
 def _checkProtection( self ):
     RHDisplayBaseProtected._checkProtection( self )
예제 #7
0
 def _checkProtection(self):
     RHDisplayBaseProtected._checkProtection(self)
예제 #8
0
 def _checkProtection( self ):
     if not any(self._notify("isPluginAdmin", {"user": self._getUser(), "plugins": "any"}) +
                self._notify("isPluginTypeAdmin", {"user": self._getUser()})):
         RHDisplayBaseProtected._checkProtection( self )
예제 #9
0
 def _checkProtection(self):
     if isinstance(self._file.getOwner(), Abstract):
         RHDisplayBaseProtected._checkProtection(self)
     else:
         # superseded by attachments
         raise NotFound
예제 #10
0
 def _checkProtection( self ):
     if isinstance(self._file.getOwner(), Abstract):
         RHDisplayBaseProtected._checkProtection(self)
     else:
         # superseded by attachments
         raise NotFound