• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python base.RHProtected类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中MaKaC.webinterface.rh.base.RHProtected的典型用法代码示例。如果您正苦于以下问题:Python RHProtected类的具体用法?Python RHProtected怎么用?Python RHProtected使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了RHProtected类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: _checkProtection

 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")
开发者ID:VishrutMehta,项目名称:indico,代码行数:7,代码来源:admins.py


示例2: _checkProtection

 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")
开发者ID:jbenito3,项目名称:indico,代码行数:7,代码来源:users.py


示例3: _checkProtection

 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")
开发者ID:NIIF,项目名称:indico,代码行数:9,代码来源:admins.py


示例4: _checkProtection

 def _checkProtection( self ):
     RHProtected._checkSessionUser( self )
     if not self._aw.getUser():
         raise errors.AccessControlError("user")
开发者ID:aninhalacerda,项目名称:indico,代码行数:4,代码来源:users.py


示例5: _checkProtection

 def _checkProtection( self ):
     if self._group.getMemberList() == []:
         return
     RHProtected._checkProtection( self )
     if not self._group.canModify( self._aw ):
         raise errors.ModificationError("group")
开发者ID:NIIF,项目名称:indico,代码行数:6,代码来源:groups.py


示例6: _checkProtection

 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."))
开发者ID:belokop,项目名称:indico_bare,代码行数:6,代码来源:admins.py


示例7: _checkParams

 def _checkParams(self, params):
     RHProtected._checkParams(self, params)
     self._minfo = HelperMaKaCInfo.getMaKaCInfoInstance()
开发者ID:belokop,项目名称:indico_bare,代码行数:3,代码来源:admins.py


示例8: _checkProtection

 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.')
开发者ID:fph,项目名称:indico,代码行数:6,代码来源:controllers.py


示例9: _checkProtection

 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")
开发者ID:aninhalacerda,项目名称:indico,代码行数:6,代码来源:services.py


示例10: _checkProtection

 def _checkProtection(self):
     RHProtected._checkProtection(self)
     if not can_manage_attachments(self.object, session.user):
         raise Forbidden
开发者ID:MichelCordeiro,项目名称:indico,代码行数:4,代码来源:event.py


示例11: _checkProtection

 def _checkProtection(self):
     RHProtected._checkProtection(self)
     if self._doProcess and not get_managed_vc_plugins(session.avatar):
         raise AccessError
开发者ID:marcosmolla,项目名称:indico,代码行数:4,代码来源:controllers.py


示例12: _checkProtection

    def _checkProtection( self ):

        RHProtected._checkProtection( self )
        if not self._avatar.canUserModify( self._getUser() ):
            raise errors.AccessControlError("user")
开发者ID:arturodr,项目名称:indico,代码行数:5,代码来源:users.py


示例13: _checkSessionUser

 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.'))
开发者ID:OmeGak,项目名称:indico,代码行数:6,代码来源:__init__.py



注:本文中的MaKaC.webinterface.rh.base.RHProtected类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python collaboration.RCCollaborationAdmin类代码示例发布时间:2022-05-24
下一篇:
Python base.RHModificationBaseProtected类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap