projects
/
Pman.Admin
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sync
[Pman.Admin]
/
GroupRights.php
diff --git
a/GroupRights.php
b/GroupRights.php
index
61d8dbe
..
0dbd455
100644
(file)
--- a/
GroupRights.php
+++ b/
GroupRights.php
@@
-12,7
+12,7
@@
class Pman_Admin_GroupRights extends Pman
parent::getAuth(); // load company!
$au = $this->getAuthUser();
if (!$au) {
parent::getAuth(); // load company!
$au = $this->getAuthUser();
if (!$au) {
- $this->jerr
(
"Not authenticated", array('authFailure' => true));
+ $this->jerr
or("LOGIN-NOAUTH",
"Not authenticated", array('authFailure' => true));
}
if ($au->company()->comptype !='OWNER') {
}
if ($au->company()->comptype !='OWNER') {
@@
-35,7
+35,7
@@
class Pman_Admin_GroupRights extends Pman
$this->jerr("NO GROUP");
}
$this->jerr("NO GROUP");
}
- if (!$this->checkPerm('
Core.Groups','
E')) { // editing groups..
+ if (!$this->checkPerm('E')) { // editing groups..
$this->jerr("PERMISSION DENIED");
}
$this->jerr("PERMISSION DENIED");
}
@@
-75,17
+75,28
@@
class Pman_Admin_GroupRights extends Pman
$cur[$k] = clone($gr);
}
$cur[$k] = clone($gr);
}
-
+ $short = explode('.',$k);
$ar[] = array(
'id' => $cur[$k]->id * 1, //
'rightname' => $k,
'descript' => isset($defdata[2]) ? $defdata[2] : '' ,
'accessmask' => $cur[$k]->accessmask,
'FullMask' => $defdata[0],
$ar[] = array(
'id' => $cur[$k]->id * 1, //
'rightname' => $k,
'descript' => isset($defdata[2]) ? $defdata[2] : '' ,
'accessmask' => $cur[$k]->accessmask,
'FullMask' => $defdata[0],
- 'group_id' => (int)$_GET['group_id']
+ 'group_id' => (int)$_GET['group_id'],
+ 'shortname' => $short[0]
);
}
);
}
+
+ if (isset($_GET['_sort'])) {
+ foreach ($ar as $key => $row) {
+ $shortname[$key] = $row['shortname'];
+ $descript[$key] = $row['descript'];
+ }
+
+ array_multisort($shortname, SORT_ASC, $descript, SORT_ASC, $ar);
+ }
+
$this->jdata($ar);
$this->jdata($ar);
@@
-99,7
+110,7
@@
class Pman_Admin_GroupRights extends Pman
$this->jerr("NO GROUP");
}
$this->jerr("NO GROUP");
}
- if (!$this->checkPerm('
Core.Groups','
E')) { // editing groups..
+ if (!$this->checkPerm('E')) { // editing groups..
$this->jerr("PERMISSION DENIED");
}
$this->jerr("PERMISSION DENIED");
}
@@
-135,9
+146,9
@@
class Pman_Admin_GroupRights extends Pman
}
}
- function checkPerm($
perms, $
lvl)
+ function checkPerm($lvl)
{
{
- return $this->hasPerm(
$perms
, $lvl);
+ return $this->hasPerm(
'Core.Groups'
, $lvl);
}
}
\ No newline at end of file
}
}
\ No newline at end of file