Source for file Rights.php
Documentation is available at Rights.php
require_once 'index.php';
$areas = $admin->perm ->getAreas ();
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
} elseif (empty ($areas)) {
echo 'Run the <strong>Area</strong> test first<br />';
foreach ($areas as $row) {
for ($i = 1; $i < 20; $i++ ) {
'area_id' => $row['area_id'],
'right_define_name' => 'RIGHT_' . $row['area_id'] . '_' . rand(),
$rightId = $admin->perm ->addRight ($data);
if ($rightId === false ) {
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo 'Created Right Id <strong>'. $rightId. '</strong><br />';
$rights = $admin->perm ->getRights ();
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
} elseif (empty ($rights)) {
echo 'No rights were found, thus we\'ve halted the rest of the test<br />';
echo 'These are our current rights:';
Var_Dump ::display ($rights);
$filters = array ('right_id' => $rights[$id]['right_id']);
$rmRight = $admin->perm ->removeRight ($filters);
if ($rmRight === false ) {
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo '<strong>Right_' . $id . '</strong> was removed<br />';
$data = array ('right_define_name' => 'RIGHT_' . $id . '_UPDATED');
$filters = array ('right_id' => $rights[$id]['right_id']);
$upRight = $admin->perm ->updateRight ($data, $filters);
if ($upRight === false ) {
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo '<strong>Right_'. $id . '</strong> was updated<br />';
$params = array ('filters' => array ('right_id' => $rights[$id]['right_id']));
$result = $admin->perm ->getRights ($params);
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
} elseif (empty ($result)) {
echo 'No rights were found<br />';
Var_Dump ::display ($result);
$rights = $admin->perm ->getRights ();
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
} elseif (empty ($rights)) {
echo 'No rights were found<br />';
echo 'These are our current rights:';
Var_Dump ::display ($rights);
Documentation generated on Mon, 11 Mar 2019 14:16:44 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|