本文整理汇总了Python中MaKaC.webinterface.rh.base.RHModificationBaseProtected._checkProtection方法的典型用法代码示例。如果您正苦于以下问题:Python RHModificationBaseProtected._checkProtection方法的具体用法?Python RHModificationBaseProtected._checkProtection怎么用?Python RHModificationBaseProtected._checkProtection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MaKaC.webinterface.rh.base.RHModificationBaseProtected
的用法示例。
在下文中一共展示了RHModificationBaseProtected._checkProtection方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHModificationBaseProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHModificationBaseProtected import _checkProtection [as 别名]
def _checkProtection(self):
if self._target.canModify( self.getAW() ):
RHModificationBaseProtected._checkProtection(self)
return
else:
self._doProcess = False
self._redirect(urlHandlers.UHCategoryDisplay.getURL(self._target))
示例2: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHModificationBaseProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHModificationBaseProtected import _checkProtection [as 别名]
def _checkProtection( self ):
target = self._target
try:
self._target = self._conf
RHModificationBaseProtected._checkProtection(self)
finally:
self._target = target
CFAEnabled.checkEnabled(self)
示例3: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHModificationBaseProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHModificationBaseProtected import _checkProtection [as 别名]
def _checkProtection( self ):
RHModificationBaseProtected._checkProtection( self )
示例4: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHModificationBaseProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHModificationBaseProtected import _checkProtection [as 别名]
def _checkProtection( self ):
if self._material.getSession() != None:
if self._material.getSession().canCoordinate(self.getAW(), "modifContribs"):
return
RHModificationBaseProtected._checkProtection( self )
示例5: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHModificationBaseProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHModificationBaseProtected import _checkProtection [as 别名]
def _checkProtection(self):
if self._conf.id == 'default':
if not session.user or not session.user.is_admin:
raise Forbidden
else:
RHModificationBaseProtected._checkProtection(self)
示例6: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHModificationBaseProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHModificationBaseProtected import _checkProtection [as 别名]
def _checkProtection(self):
owner = self._target.getContribution()
if owner.getSession() != None:
if owner.getSession().canCoordinate(self.getAW(), "modifContribs"):
return
RHModificationBaseProtected._checkProtection(self)
示例7: _checkProtection
# 需要导入模块: from MaKaC.webinterface.rh.base import RHModificationBaseProtected [as 别名]
# 或者: from MaKaC.webinterface.rh.base.RHModificationBaseProtected import _checkProtection [as 别名]
def _checkProtection( self ):
RHModificationBaseProtected._checkProtection( self )
CFAEnabled.checkEnabled(self)