Ejemplo n.º 1
0
    def _checkProtection(self):
        if not session.user:
            raise Forbidden
        # If the user cannot manage the whole event see if anything gives them
        # limited management access.
        if not self.event_new.can_manage(session.user):
            urls = sorted(
                values_from_signal(
                    signals.event_management.management_url.send(
                        self.event_new),
                    single_value=True))
            response = redirect(urls[0]) if urls else None
            raise Forbidden(response=response)

        RHManageEventBase._checkProtection(
            self)  # mainly to trigger the legacy "event locked" check
Ejemplo n.º 2
0
 def _checkProtection(self):
     self.ALLOW_LOCKED = self.event_new.can_lock(session.user)
     RHManageEventBase._checkProtection(self)
Ejemplo n.º 3
0
 def _checkProtection(self):
     RHManageEventBase._checkProtection(self)
     if not self.event_new.can_lock(session.user):
         raise Forbidden