if (!isset($_GET['group_id']) || (int)$_GET['group_id'] < 0) {
$this->jerr("NO GROUP");
}
- if (!$this->hasPerm( 'Core.Groups','S')) { // listing groups..
+
+ if (!$this->checkPerm('E')) { // editing groups..
$this->jerr("PERMISSION DENIED");
}
);
}
+ //print_r($ar);
+ usort($ar, function($a, $b) {
+ $retval = $a['rightname'] - $b['rightname'];
+ if ($retval == 0) {
+ $retval = $a['descript'] - $b['descript'];
+ }
+ return $retval;
+ });
+ //print_r($ar);exit;
$this->jdata($ar);
if (!isset($_POST['group_id']) || (int)$_POST['group_id'] < 0) {
$this->jerr("NO GROUP");
}
- if (!$this->hasPerm( 'Core.Groups','E')) { // editing groups..
+
+ if (!$this->checkPerm('E')) { // editing groups..
$this->jerr("PERMISSION DENIED");
}
-
-
-
-
// add or update..
if (!empty($_POST['dataUpdate'])) {
foreach($_POST['dataUpdate'] as $id => $ac) {
}
-
-
-
+ function checkPerm($lvl)
+ {
+ return $this->hasPerm('Core.Groups', $lvl);
+ }
}
\ No newline at end of file