diversen opmerkingen

This commit is contained in:
2018-07-29 10:11:02 +02:00
parent cecbfd83fb
commit 30535f7048
34 changed files with 11883 additions and 82 deletions
@@ -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();
}
}