diversen opmerkingen
This commit is contained in:
@@ -30,7 +30,22 @@ class AuthorisationController extends MY_Controller {
|
||||
{
|
||||
$roleAuthorisations = Role::getPagesAccessByRole();
|
||||
|
||||
return $roleAuthorisations;
|
||||
$this->json( $roleAuthorisations );
|
||||
}
|
||||
|
||||
public function toggleAuhorisation()
|
||||
{
|
||||
$pageID = $this->clean_input( 'pageID' );
|
||||
$roleLevel = $this->clean_input( 'roleLevel' );
|
||||
$access = $this->clean_input( 'access' );
|
||||
|
||||
$page = Page::find( $pageID );
|
||||
|
||||
if ( $access == 'F' ) $roleLevel = - $roleLevel;
|
||||
|
||||
$page->pagelevel = $page->pagelevel + $roleLevel;
|
||||
|
||||
$page->save();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user