本文整理匯總了Python中indico.modules.events.controllers.base.RHDisplayEventBase._check_access方法的典型用法代碼示例。如果您正苦於以下問題:Python RHDisplayEventBase._check_access方法的具體用法?Python RHDisplayEventBase._check_access怎麽用?Python RHDisplayEventBase._check_access使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類indico.modules.events.controllers.base.RHDisplayEventBase
的用法示例。
在下文中一共展示了RHDisplayEventBase._check_access方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _check_access
# 需要導入模塊: from indico.modules.events.controllers.base import RHDisplayEventBase [as 別名]
# 或者: from indico.modules.events.controllers.base.RHDisplayEventBase import _check_access [as 別名]
def _check_access(self):
RHDisplayEventBase._check_access(self)
# Only let managers access the management versions.
if self.management and not self.event.cfp.is_manager(session.user):
raise Forbidden
示例2: _check_access
# 需要導入模塊: from indico.modules.events.controllers.base import RHDisplayEventBase [as 別名]
# 或者: from indico.modules.events.controllers.base.RHDisplayEventBase import _check_access [as 別名]
def _check_access(self):
RHDisplayEventBase._check_access(self)
if not is_menu_entry_enabled(self.MENU_ENTRY_NAME, self.event):
self._forbidden_if_not_admin()
示例3: _check_access
# 需要導入模塊: from indico.modules.events.controllers.base import RHDisplayEventBase [as 別名]
# 或者: from indico.modules.events.controllers.base.RHDisplayEventBase import _check_access [as 別名]
def _check_access(self):
RHDisplayEventBase._check_access(self)
# Only let event managers access the management versions.
if self.management and not self.event.can_manage(session.user):
raise Forbidden
check_event_locked(self, self.event)
示例4: _check_access
# 需要導入模塊: from indico.modules.events.controllers.base import RHDisplayEventBase [as 別名]
# 或者: from indico.modules.events.controllers.base.RHDisplayEventBase import _check_access [as 別名]
def _check_access(self):
if not session.user:
raise Forbidden
RHDisplayEventBase._check_access(self)
示例5: _check_access
# 需要導入模塊: from indico.modules.events.controllers.base import RHDisplayEventBase [as 別名]
# 或者: from indico.modules.events.controllers.base.RHDisplayEventBase import _check_access [as 別名]
def _check_access(self):
RHDisplayEventBase._check_access(self)
if not self.entry.can_view(session.user):
raise Forbidden