def _checkProtection(self): if not any( self._notify("isPluginAdmin", { "user": self._getUser(), "plugins": "any" }) + self._notify("isPluginTypeAdmin", {"user": self._getUser()})): RHDisplayBaseProtected._checkProtection(self)
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 )
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 )
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)
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 )
def _checkProtection( self ): RHDisplayBaseProtected._checkProtection( self )
def _checkProtection(self): RHDisplayBaseProtected._checkProtection(self)
def _checkProtection( self ): if not any(self._notify("isPluginAdmin", {"user": self._getUser(), "plugins": "any"}) + self._notify("isPluginTypeAdmin", {"user": self._getUser()})): RHDisplayBaseProtected._checkProtection( self )
def _checkProtection(self): if isinstance(self._file.getOwner(), Abstract): RHDisplayBaseProtected._checkProtection(self) else: # superseded by attachments raise NotFound
def _checkProtection( self ): if isinstance(self._file.getOwner(), Abstract): RHDisplayBaseProtected._checkProtection(self) else: # superseded by attachments raise NotFound