Ejemplo n.º 1
0
 def _checkProtection(self):
     if not self._target.canManageRegistration(self.getAW().getUser()):
         conferenceModif.RHConferenceModifBase._checkProtection(self)
     if self._target.getConference().isClosed():
         raise ConferenceClosedError(self._target.getConference())
     if not self._conf.hasEnabledSection("regForm"):
         raise MaKaCError(
             _("The registration form was disabled by the conference managers"
               ))
Ejemplo n.º 2
0
 def _checkProtection(self):
     if not self._target.canModify(self.getAW()):
         if self._target.getModifKey() != "":
             raise ModificationError()
         if self._getUser() is None:
             self._checkSessionUser()
         else:
             raise ModificationError()
     if hasattr(self._target, "getConference") and not self._allowClosed:
         if self._target.getConference().isClosed():
             raise ConferenceClosedError(self._target.getConference())
Ejemplo n.º 3
0
 def _checkProtection(self):
     if isinstance(self._target, Conference):
         can_manage = self._target.as_event.can_manage(session.user, role=self.ROLE)
     else:
         can_manage = self._target.canModify(session.avatar)
     if not can_manage:
         if self._getUser() is None:
             self._checkSessionUser()
         else:
             raise ModificationError()
     if hasattr(self._target, "getConference") and not self._allowClosed:
         if self._target.getConference().isClosed():
             raise ConferenceClosedError(self._target.getConference())
Ejemplo n.º 4
0
 def _checkProtection(self):
     if not self._target.canManageRegistration(self.getAW().getUser()):
         conferenceModif.RHConferenceModifBase._checkProtection(self)
     if self._target.getConference().isClosed():
         raise ConferenceClosedError(self._target.getConference())