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


PHP UserAccess::getAccessListItems方法代码示例

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


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

示例1: getAccessListItems

 public function getAccessListItems($accessType = PermissionKey::ACCESS_TYPE_INCLUDE, $filterEntities = array())
 {
     $db = Database::connection();
     $list = parent::getAccessListItems($accessType, $filterEntities);
     foreach ($list as $l) {
         $pe = $l->getAccessEntityObject();
         if ($this->permissionObjectToCheck instanceof Page && $l->getAccessType() == PermissionKey::ACCESS_TYPE_INCLUDE) {
             $permission = 'A';
         } else {
             $permission = $db->fetchColumn('select permission from UserPermissionViewAttributeAccessList where paID = ? and peID = ?', array($l->getPermissionAccessID(), $pe->getAccessEntityID()));
             if ($permission != 'N' && $permission != 'C') {
                 $permission = 'A';
             }
         }
         $l->setAttributesAllowedPermission($permission);
         if ($permission == 'C') {
             $akIDs = $db->GetCol('select akID from UserPermissionViewAttributeAccessListCustom where paID = ? and peID = ?', array($l->getPermissionAccessID(), $pe->getAccessEntityID()));
             $l->setAttributesAllowedArray($akIDs);
         }
     }
     return $list;
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:22,代码来源:ViewUserAttributesUserAccess.php

示例2: getAccessListItems

 public function getAccessListItems($accessType = UserPermissionKey::ACCESS_TYPE_INCLUDE, $filterEntities = array())
 {
     $db = Loader::db();
     $list = parent::getAccessListItems($accessType, $filterEntities);
     $list = PermissionDuration::filterByActive($list);
     foreach ($list as $l) {
         $pe = $l->getAccessEntityObject();
         $prow = $db->GetRow('select attributePermission, uName, uPassword, uEmail, uAvatar, uTimezone, uDefaultLanguage from UserPermissionEditPropertyAccessList where peID = ? and paID = ?', array($pe->getAccessEntityID(), $this->getPermissionAccessID()));
         if (is_array($prow) && $prow['attributePermission']) {
             $l->setAttributesAllowedPermission($prow['attributePermission']);
             $l->setAllowEditUserName($prow['uName']);
             $l->setAllowEditEmail($prow['uEmail']);
             $l->setAllowEditPassword($prow['uPassword']);
             $l->setAllowEditAvatar($prow['uAvatar']);
             $l->setAllowEditTimezone($prow['uTimezone']);
             $l->setAllowEditDefaultLanguage($prow['uDefaultLanguage']);
             $attributePermission = $prow['attributePermission'];
         } else {
             if ($l->getAccessType() == UserPermissionKey::ACCESS_TYPE_INCLUDE) {
                 $l->setAttributesAllowedPermission('A');
                 $l->setAllowEditUserName(1);
                 $l->setAllowEditEmail(1);
                 $l->setAllowEditPassword(1);
                 $l->setAllowEditAvatar(1);
                 $l->setAllowEditTimezone(1);
                 $l->setAllowEditDefaultLanguage(1);
             } else {
                 $l->setAttributesAllowedPermission('N');
                 $l->setAllowEditUserName(0);
                 $l->setAllowEditEmail(0);
                 $l->setAllowEditPassword(0);
                 $l->setAllowEditAvatar(0);
                 $l->setAllowEditTimezone(0);
                 $l->setAllowEditDefaultLanguage(0);
             }
         }
         if ($attributePermission == 'C') {
             $akIDs = $db->GetCol('select akID from UserPermissionEditPropertyAttributeAccessListCustom where peID = ? and paID = ?', array($pe->getAccessEntityID(), $this->getPermissionAccessID()));
             $l->setAttributesAllowedArray($akIDs);
         }
     }
     return $list;
 }
开发者ID:ngreimel,项目名称:kovent,代码行数:43,代码来源:EditUserPropertiesUserAccess.php


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