当前位置: 首页>>代码示例>>PHP>>正文


PHP FormSpecialPage::checkExecutePermissions方法代码示例

本文整理汇总了PHP中FormSpecialPage::checkExecutePermissions方法的典型用法代码示例。如果您正苦于以下问题:PHP FormSpecialPage::checkExecutePermissions方法的具体用法?PHP FormSpecialPage::checkExecutePermissions怎么用?PHP FormSpecialPage::checkExecutePermissions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FormSpecialPage的用法示例。


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

示例1: checkExecutePermissions

 protected function checkExecutePermissions(User $user)
 {
     parent::checkExecutePermissions($user);
     if (!$this->getRequest()->wasPosted()) {
         $this->requireLogin('resetpass-no-info');
     }
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:7,代码来源:SpecialChangePassword.php

示例2: checkExecutePermissions

 public function checkExecutePermissions(User $user)
 {
     parent::checkExecutePermissions($user);
     # If the lock file isn't writable, we can do sweet bugger all
     if (!file_exists($this->getConfig()->get('ReadOnlyFile'))) {
         throw new ErrorPageError('lockdb', 'databasenotlocked');
     }
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:8,代码来源:SpecialUnlockdb.php

示例3: checkExecutePermissions

 public function checkExecutePermissions(User $user)
 {
     global $wgReadOnly;
     FormSpecialPage::checkExecutePermissions($user);
     if (empty($wgReadOnly)) {
         throw new ErrorPageError('lockdb', 'databasenotlocked');
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:8,代码来源:SpecialUnlockdb.class.php

示例4: checkExecutePermissions

 public function checkExecutePermissions(User $user)
 {
     $status = Status::wrap($this->passwordReset->isAllowed($user));
     if (!$status->isGood()) {
         throw new ErrorPageError('internalerror', $status->getMessage());
     }
     parent::checkExecutePermissions($user);
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:8,代码来源:SpecialPasswordReset.php

示例5: checkExecutePermissions

 /**
  * Checks that the user can unblock themselves if they are trying to do so
  *
  * @param User $user
  * @throws ErrorPageError
  */
 protected function checkExecutePermissions(User $user)
 {
     parent::checkExecutePermissions($user);
     # bug 15810: blocked admins should have limited access here
     $status = self::checkUnblockSelf($this->target, $user);
     if ($status !== true) {
         throw new ErrorPageError('badaccess', $status);
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:15,代码来源:SpecialBlock.php

示例6: checkExecutePermissions

 public function checkExecutePermissions(User $user)
 {
     global $wgReadOnlyFile;
     parent::checkExecutePermissions($user);
     # If the lock file isn't writable, we can do sweet bugger all
     if (!is_writable(dirname($wgReadOnlyFile))) {
         throw new ErrorPageError('lockdb', 'lockfilenotwritable');
     }
 }
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:9,代码来源:SpecialLockdb.php

示例7: checkExecutePermissions

 public function checkExecutePermissions(User $user)
 {
     global $wgReadOnlyFile;
     parent::checkExecutePermissions($user);
     # If the lock file isn't writable, we can do sweet bugger all
     if (!file_exists($wgReadOnlyFile)) {
         throw new ErrorPageError('lockdb', 'databasenotlocked');
     }
 }
开发者ID:Tarendai,项目名称:spring-website,代码行数:9,代码来源:SpecialUnlockdb.php

示例8: checkExecutePermissions

 public function checkExecutePermissions(User $user)
 {
     $error = $this->canChangePassword($user);
     if (is_string($error)) {
         throw new ErrorPageError('internalerror', $error);
     } elseif (!$error) {
         throw new ErrorPageError('internalerror', 'resetpass_forbidden');
     }
     return parent::checkExecutePermissions($user);
 }
开发者ID:laiello,项目名称:media-wiki-law,代码行数:10,代码来源:SpecialPasswordReset.php

示例9: checkExecutePermissions

 protected function checkExecutePermissions(User $user)
 {
     parent::checkExecutePermissions($user);
     if (!$this->getConfig()->get('EnableBotPasswords')) {
         throw new ErrorPageError('botpasswords', 'botpasswords-disabled');
     }
     $this->userId = CentralIdLookup::factory()->centralIdFromLocalUser($this->getUser());
     if (!$this->userId) {
         throw new ErrorPageError('botpasswords', 'botpasswords-no-central-id');
     }
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:11,代码来源:SpecialBotPasswords.php

示例10: checkExecutePermissions

 protected function checkExecutePermissions(User $user)
 {
     if (!AuthManager::singleton()->allowsPropertyChange('emailaddress')) {
         throw new ErrorPageError('changeemail', 'cannotchangeemail');
     }
     $this->requireLogin('changeemail-no-info');
     // This could also let someone check the current email address, so
     // require both permissions.
     if (!$this->getUser()->isAllowed('viewmyprivateinfo')) {
         throw new PermissionsError('viewmyprivateinfo');
     }
     parent::checkExecutePermissions($user);
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:13,代码来源:SpecialChangeEmail.php


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