Source for file ImplyRights.php
Documentation is available at ImplyRights.php
require_once 'index.php';
echo '<h3>ImplyRights</h3>';
$rights = $admin->perm ->getRights ();
echo 'Run the <b>Right</b> test first<br />';
for ($i = 0; $i < 25; $i++ ) {
'right_id' => $rights[$right]['right_id'],
'implied_right_id' => $rights[$imright]['right_id']
$result = $admin->perm ->implyRight ($data);
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo '<strong>' . $rights[$imright]['right_id'] . '</strong> is now
implied right from <strong>'. $rights[$right]['right_id'] . '</strong><br />';
echo 'All the rights:<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 />';
Var_Dump ::display ($rights);
$filters = array ('right_id' => $rights[$id]['right_id']);
$unimply = $admin->perm ->unimplyRight ($filters);
if ($unimply === false ) {
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo 'Removed all records with the right id <strong>' . $rights[$id]['right_id'] . '</strong><br />';
$filters = array ('implied_right_id' => $rights[$id]['right_id']);
$unimply = $admin->perm ->unimplyRight ($filters);
if ($unimply === false ) {
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo 'Removed all records with the implied right id <strong>' . $rights[$id]['right_id'] . '</strong><br />';
// By implied right id and right id
'right_id' => $rights[$right]['right_id'],
'implied_right_id' => $rights[$impliedRight]['right_id']
$unimply = $admin->perm ->unimplyRight ($filters);
if ($unimply === false ) {
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
echo 'Removed the record that has <strong>' . $rights[$right]['right_id'] . '</strong>
as right id and <strong>' . $rights[$impliedRight]['right_id'] . '</strong> as implied right id<br />';
echo 'All the rights:<br />';
$rights = $admin->perm ->getRights ();
echo '<strong>Error on line: '.__LINE__. '</strong><br />';
} elseif (empty ($rights)) {
echo 'No rights were found<br />';
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.
|