當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。