本文整理汇总了Python中MaKaC.webinterface.rh.base.RHProtected._checkProtection方法的典型用法代码示例。如果您正苦于以下问题:Python RHProtected._checkProtection方法的具体用法?Python RHProtected._checkProtection怎么用?Python RHProtected._checkProtection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MaKaC.webinterface.rh.base.RHProtected
的用法示例。
在下文中一共展示了RHProtected._checkProtection方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
def _checkProtection( self ):
RHProtected._checkProtection( self )
self._al = self._minfo.getAdminList()
if not self._al.isAdmin( self._getUser() ):
if self._getUser() != None and len( self._al.getList() )==0:
return
raise AdminError("area")
示例2: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
def _checkProtection(self):
RHProtected._checkProtection(self)
if not self._doProcess:
# Logged-in check failed
return
if not self._avatar.canUserModify(self._getUser()):
raise errors.AccessControlError("user")
示例3: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
def _checkProtection(self):
RHProtected._checkProtection(self)
if not session.user and not self._doProcess:
return
self._al = HelperMaKaCInfo.getMaKaCInfoInstance().getAdminList()
if not session.user.isAdmin():
if not self._al.getList(): # XXX can we just fail here instead of pretending the user is an admin?!
return
raise AdminError("area")
示例4: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
def _checkProtection( self ):
RHProtected._checkProtection( self )
if not self._avatar.canUserModify( self._getUser() ):
raise ModificationError("user")
示例5: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
def _checkProtection( self ):
if self._group.getMemberList() == []:
return
RHProtected._checkProtection( self )
if not self._group.canModify( self._aw ):
raise errors.ModificationError("group")
示例6: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
def _checkProtection(self):
RHProtected._checkProtection(self)
if not session.user and not self._doProcess:
return
if not session.user.is_admin:
raise Forbidden(_("Only Indico administrators may access this page."))
示例7: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
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.')
示例8: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
def _checkProtection( self ):
RHProtected._checkProtection( self )
self._al = self._minfo.getAdminList()
self._wm = webcast.HelperWebcastManager.getWebcastManagerInstance()
if not self._wm.isManager( self._getUser() ) and not self._al.isAdmin( self._getUser() ):
raise WebcastAdminError("management area")
示例9: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
def _checkProtection(self):
RHProtected._checkProtection(self)
if not can_manage_attachments(self.object, session.user):
raise Forbidden
示例10: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
def _checkProtection(self):
RHProtected._checkProtection(self)
if self._doProcess and not get_managed_vc_plugins(session.avatar):
raise AccessError
示例11: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHProtected import _checkProtection [as 别名]
def _checkProtection( self ):
RHProtected._checkProtection( self )
if not self._avatar.canUserModify( self._getUser() ):
raise errors.AccessControlError("user")