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


PHP Admin::hasPermission方法代码示例

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


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

示例1: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     foreach (array(Am_Auth_Admin::PERM_LOGS, Am_Auth_Admin::PERM_LOGS_ACCESS, Am_Auth_Admin::PERM_LOGS_INVOICE, Am_Auth_Admin::PERM_LOGS_MAIL, Am_Auth_Admin::PERM_LOGS_ADMIN) as $perm) {
         if ($admin->hasPermission($perm)) {
             return true;
         }
     }
     return false;
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:9,代码来源:AdminLogsController.php

示例2: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission(Am_Auth_Admin::PERM_REPORT);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:4,代码来源:AdminVatReportController.php

示例3: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission("grid_content");
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:4,代码来源:AdminDirbrowserController.php

示例4: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission(Am_Auth_Admin::PERM_SYSTEM_INFO);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:4,代码来源:AdminInfoController.php

示例5: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission(Am_Plugin_Oto::ADMIN_PERM_ID);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:4,代码来源:oto.php

示例6: hasPermission

 public function hasPermission(Admin $admin)
 {
     return $admin->hasPermission($this->permission);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:4,代码来源:Widget.php

示例7: getAdminPermission

 protected function getAdminPermission(Admin $identity, $prefix)
 {
     if ($identity->isSuper()) {
         return self::ACCESS_ALL;
     }
     $prefixList = $this->getPrefixACList();
     $prefixAC = $prefixList[$prefix];
     $perm = self::ACCESS_NONE;
     if (isset($prefixAC[self::IDENTITY_TYPE_ADMIN])) {
         if (is_array($prefixAC[self::IDENTITY_TYPE_ADMIN])) {
             foreach ($prefixAC[self::IDENTITY_TYPE_ADMIN] as $globPerm => $uploadPerm) {
                 if ($identity->hasPermission($globPerm)) {
                     $perm |= $uploadPerm;
                 }
             }
         } else {
             $perm = $prefixAC[self::IDENTITY_TYPE_ADMIN];
         }
     }
     return $perm;
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:21,代码来源:Acl.php

示例8: getAdminPermission

 protected function getAdminPermission(Admin $identity, $prefix)
 {
     if ($identity->isSuper()) {
         return self::ACCESS_ALL;
     }
     $prefixList = $this->getPrefixACList();
     $prefixAC = $prefixList[$prefix];
     $perm = self::ACCESS_NONE;
     if (isset($prefixAC[self::IDENTITY_TYPE_ADMIN])) {
         if (is_array($prefixAC[self::IDENTITY_TYPE_ADMIN])) {
             foreach ($prefixAC[self::IDENTITY_TYPE_ADMIN] as $globPerm => $uploadPerm) {
                 preg_match('/^([^][]*)(\\[([^][]*)])?$/i', $globPerm, $matches);
                 if ($identity->hasPermission($matches[1], isset($matches[3]) ? $matches[3] : null)) {
                     $perm |= $uploadPerm;
                 }
             }
         } else {
             $perm = $prefixAC[self::IDENTITY_TYPE_ADMIN];
         }
     }
     return $perm;
 }
开发者ID:grlf,项目名称:eyedock,代码行数:22,代码来源:Acl.php

示例9: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission('grid_invoice', 'browse') || $admin->hasPermission('grid_access', 'browse') || $admin->hasPermission('grid_payment', 'browse');
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:4,代码来源:AdminUserPaymentsController.php

示例10: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission(Am_Auth_Admin::PERM_SUPER_USER);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:4,代码来源:AdminImportYourMembersController.php

示例11: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission(Am_Auth_Admin::PERM_TRANSLATION);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:4,代码来源:AdminTransGlobalController.php

示例12: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission(Bootstrap_Helpdesk::ADMIN_PERM_ID);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:4,代码来源:Controller.php

示例13: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission(Am_Auth_Admin::PERM_BACKUP_RESTORE);
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:4,代码来源:AdminRestoreController.php

示例14: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission(Am_Auth_Admin::PERM_COUNTRY_STATE);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:4,代码来源:AdminStatesController.php

示例15: checkAdminPermissions

 public function checkAdminPermissions(Admin $admin)
 {
     return $admin->hasPermission(Am_Auth_Admin::PERM_BUILD_DEMO);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:4,代码来源:AdminBuildDemoController.php


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