示例#1
0
 def _checkSessionUser(self):
     if not Config.getInstance().getIsRoomBookingActive():
         raise NotFound(_('The room booking module is not enabled.'))
     RHProtected._checkSessionUser(self)
     if not rb_check_user_access(session.user):
         raise Forbidden(
             _('Your are not authorized to access the room booking system.')
         )
示例#2
0
 def _checkSessionUser(self):
     if not config.ENABLE_ROOMBOOKING:
         raise NotFound(_('The room booking module is not enabled.'))
     RHProtected._checkSessionUser(self)
     if not rb_check_user_access(session.user):
         raise Forbidden(
             _('Your are not authorized to access the room booking system.')
         )
示例#3
0
 def _checkProtection(self):
     RHProtected._checkProtection(self)
     if not self._doProcess:  # not logged in
         return
     if not self.user.can_be_modified(session.user):
         raise Forbidden('You cannot modify this user.')
示例#4
0
 def _checkProtection(self):
     RHProtected._checkProtection(self)
示例#5
0
 def _checkProtection(self):
     RHProtected._checkProtection(self)
     if not can_manage_attachments(self.object, session.user):
         raise Forbidden
     check_event_locked(self, self.event_new)
示例#6
0
 def _check_access(self):
     RHProtected._check_access(self)
     if not get_managed_vc_plugins(session.user):
         raise Forbidden
示例#7
0
 def _checkProtection(self):
     RHProtected._checkProtection(self)
     if not session.user.is_admin:
         raise Forbidden(
             _("Only Indico administrators may access this page."))