Exemplo n.º 1
0
		<table class="table">
		<thead>
		<tr>
		     <th width="1%">&nbsp;</th>
		     <th><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('permission/editrole', 'Module');
?>
</th>
		     <th><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('permission/editrole', 'Function');
?>
</th>
		</tr>
		</thead>
		     <?php 
foreach (erLhcoreClassRoleFunction::getRoleFunctions($role->id) as $Function) {
    ?>
		     <tr>
			     <td><input type="checkbox" class="mb0" name="PolicyID[]" value="<?php 
    echo $Function['id'];
    ?>
" /></td>
			     <?php 
    include erLhcoreClassDesign::designtpl('lhpermission/role_row.tpl.php');
    ?>
		     </tr>
		     <?php 
}
?>
		</table>
		
Exemplo n.º 2
0
            $RoleFunction->function = $moduleFunction;
            erLhcoreClassRole::getSession()->save($RoleFunction);
        }
    } else {
        $tpl->set('errors', $Errors);
        $tpl->setFile('lhpermission/newpolicy.tpl.php');
    }
}
if (isset($_POST['Delete_policy'])) {
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect();
        exit;
    }
    if (isset($_POST['PolicyID']) && count($_POST['PolicyID']) > 0) {
        foreach ($_POST['PolicyID'] as $PolicyID) {
            erLhcoreClassRoleFunction::deleteRolePolicy($PolicyID);
        }
    }
}
if (isset($_POST['Remove_group_from_role']) && isset($_POST['AssignedID']) && count($_POST['AssignedID']) > 0) {
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect();
        exit;
    }
    foreach ($_POST['AssignedID'] as $AssignedID) {
        erLhcoreClassGroupRole::deleteGroupRole($AssignedID);
    }
}
if (isset($_POST['AssignGroups']) && isset($_POST['GroupID']) && count($_POST['GroupID']) > 0) {
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect();