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


PHP Acl::getAclGroupList方法代码示例

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


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

示例1: getGroupList

 private function getGroupList($tree_id)
 {
     if ($this->groupList) {
         return $this->groupList;
     }
     $acl = new Acl();
     $aclList = $acl->getAclGroupList($tree_id);
     $this->groupList = array();
     foreach ($aclList as $grp_id => $rights) {
         if (!in_array(Acl::VIEW, $rights)) {
             continue;
         }
         $this->groupList[] = $grp_id;
     }
     return $this->groupList;
 }
开发者ID:rverbrugge,项目名称:dif,代码行数:16,代码来源:ReservationUserGroup.php

示例2: notify

 /**
  * notifies users able to edit node id and with notify option enabled
  * only users that are not frontend type are notified
  *
  * @param integer $tree_id node id that requests notification. Users with rights for this node will be notified
  * @param string $subject subject of email message
  * @param string $message content of notification email 
  */
 public function notify($tree_id = NULL, $subject, $message)
 {
     $searchcriteria = array('notify' => true);
     $acl = new Acl();
     $grouplist = $acl->getAclGroupList($tree_id);
     $group = array();
     foreach ($grouplist as $grp_id => $item) {
         if (in_array(Acl::EDIT, $item) || in_array(Acl::CREATE, $item) || in_array(Acl::MODIFY, $item) || in_array(Acl::DELETE, $item)) {
             $group[] = $grp_id;
         }
     }
     if ($group) {
         $searchcriteria['tree_access'] = $group;
     } else {
         $searchcriteria['role'] = self::ROLE_ADMIN;
     }
     $userlist = $this->getList($searchcriteria);
     $mailto = array();
     foreach ($userlist['data'] as $item) {
         $mailto[] = $item['email'];
     }
     if (!$mailto) {
         return;
     }
     $this->sendMail($mailto, $this->director->getConfig()->email_address, $subject, $message);
 }
开发者ID:rverbrugge,项目名称:dif,代码行数:34,代码来源:SystemUser.php

示例3: handleAdminEditRootAclGet

 /**
  * handle edit
  */
 private function handleAdminEditRootAclGet($retrieveFields = true)
 {
     $template = new TemplateEngine($this->getPath() . "templates/" . $this->templateFile);
     $request = Request::getInstance();
     if (!$request->exists('id')) {
         throw new Exception(__FUNCTION__ . ' Node ontbreekt.');
     }
     $id = intval($request->getValue('id'));
     $template->setVariable('id', $id, false);
     $key = array('id' => $id);
     // check if node exists
     if ($id != $this->tree->getRootId()) {
         throw new HttpException('403');
     }
     $this->tree->setCurrentId($id);
     $this->renderBreadcrumb();
     // check if user has execute rights
     $auth = Authentication::getInstance();
     // edit root node only for acl. only admins can edit acl
     if (!$auth->isRole(SystemUser::ROLE_ADMIN)) {
         throw new HttpException('403');
     }
     $groupSelect = array();
     if ($retrieveFields) {
         $acl = new Acl();
         $groupSelect = $acl->getAclGroupList($id);
     } else {
         $groupSelect = $request->getValue('acl');
     }
     if (!is_array($groupSelect)) {
         $groupSelect = array();
     }
     $template->setVariable('groupSelect', $groupSelect, false);
     $this->handleEdit($template, array());
     $this->template[$this->director->theme->getConfig()->main_tag] = $template;
 }
开发者ID:rverbrugge,项目名称:dif,代码行数:39,代码来源:Site.php

示例4: getUserCombo

 private function getUserCombo($tree_id, $usr_id)
 {
     $acl = new Acl();
     $aclList = $acl->getAclGroupList($tree_id);
     $groupList = array();
     foreach ($aclList as $grp_id => $rights) {
         if (!in_array(Acl::VIEW, $rights)) {
             continue;
         }
         $groupList[] = $grp_id;
     }
     $userList = $this->director->systemUser->getList(array('grp_id' => $groupList));
     return Utils::getHtmlCombo($userList['data'], $usr_id, NULL, 'id', 'formatName');
 }
开发者ID:rverbrugge,项目名称:dif,代码行数:14,代码来源:ReservationOverview.php


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