Lines Matching +full:p +full:- +full:up
6 * @author Gabriel Birke <gb@birke-software.de>
38 $this->auth = $auth;
41 if($this->auth->canDo('getUsers'))
43 $getUserFunc = array($this->auth, 'retrieveUsers');
48 $this->show_group_info = false;
51 if($this->auth->canDo('getGroups'))
52 $getGroupFunc = array($this->auth, 'retrieveGroups');
56 $this->users = call_user_func($getUserFunc);
57 $this->groups = call_user_func($getGroupFunc);
58 ksort($this->groups);
60 // Get permissions for each group and set the data in $this->aclGroupPermissions
61 $this->_aclGroupPermissions();
63 // Get explicit user permissions from ACL and set the data in $this->aclUserPermissions
64 $this->_aclUserPermissions();
66 // Associate groups with users and set the data in $this->group2user
67 $this->_group2user();
70 if($INPUT->has('show') && $INPUT->has('user'))
72 $this->_userPermissions($INPUT->str('user'));
82 switch($INPUT->str('show','overview'))
85 $this->_showUserPermissions();
89 $this->_groupOverview();
98 $id = cleanID($this->getLang('menu'));
99 ptln('<h1><a name="'.$id.'" id="'.$id.'">'.$this->getLang('menu')."</a></h1>");
100 echo $this->locale_xhtml('help');
101 foreach($this->groups as $gname => $g)
113 ptln('<header>'.$this->getLang('permissions').'</header>', 4);
114 $this->_permissionTable($this->aclGroupPermissions[$gname], "permissions".$gname);
117 if(!empty($this->group2user[$gname])) {
118 ptln('<header>'.$this->getLang('users').'</header>', 4);
120 foreach($this->group2user[$gname] as $u)
124 'page' => $this->getPluginName(),
129 …$lnk = '<a href="'.$url.'" title="'.hsc($u).'" '.(!empty($this->aclUserPermissions[$u_enc])?'clas…
130 ptln($lnk. hsc($this->users[$u]['name']) .'</a>', 6);
149 $head = sprintf($this->getLang('pi_permissionfor'), hsc($this->username));
152 echo $this->locale_xhtml('help_userpermissions');
157 'page' => $this->getPluginName(),
160 … ptln('<p class="piToOverview"><a href="'.$url.'">'.$this->getLang('pi_to_overview')."</a></p>");
163 $this->_permissionTable($this->userPermissions, 'Userpermissions');
184 ptln(" <p>".$this->getLang('pi_no_permissions_found').'</p>');
189 $s = "<tr><th>".$this->getLang('pi_resource')."</th>";
190 foreach($displayed_permissions as $p)
191 $s .= "<th>".$this->getLang('acl_perm'.$p)."</td>";
198 … $additional_class = empty($this->explicitUserPermissions[$item]) ? "" : " explicitUserPermission";
204 foreach($displayed_permissions as $p)
206 if($p & $perm)
209 ptln('<td class="piDenied">-</td>', 9);
219 * This just gets a very rudimentary user and not very useful user list -
244 * what output to expect from them. I assume a two-dimensional hash similar
245 * to that from Auth->retrieveUsers.
267 * sets $this->aclGroupPermissions in the form of a[groupname][namespace/page_name]=permission
271 $AUTH_ACL = $this->_auth_loadACL(); //without %USER% replacement
283 $this->aclGroupPermissions = array();
287 $this->aclGroupPermissions[urldecode($grpname)] = $permissions;
292 * sets $this->aclUserPermissions in the form of a[username][namespace/page_name]=permission
297 $up = array();
305 $up[$matches[2]][$matches[1]] = $matches[3];
308 $this->aclUserPermissions = array();
309 foreach($up as $usrname => $permissions)
312 $this->aclUserPermissions[$usrname] = $permissions;
317 * Build an Array in $this->group2user that associates user names with users
323 foreach(array_keys($this->groups) as $g)
325 foreach($this->users as $username => $properties)
330 $this->group2user = array();
335 $this->group2user[$grpname] = array_keys($users);
344 * $this->userPermissions Namespace/Page => Permission pairs
345 * $this->explicitUserPermissions Namespace/Page => Permission pairs
350 $userdata = $this->auth->getUserData($username);
351 $this->username = $userdata['name'];
357 $AUTH_ACL = $this->_auth_loadACL(); //without user replacement
358 $up = array();
369 $up[$ns] = (empty($up[$matches[1]])?0:$up[$matches[1]]) | $matches[3];
374 ksort($up);
376 $this->userPermissions = $up;
377 $this->explicitUserPermissions = $for_user;
382 * copyed from inc/auth -> auth_loadACL()
383 * - removed substitute of user wildcard