* [ADDED] Smarty acl_check function * [ADDED] Optional default return value for getValue calls * [UPDATE] ACL Checks in page controllers * [UPDATE] Navigation template to use check_acl from Smarty * [ADDED] New ACL options where needed * [REMOVED] Disable pages from System Settings Tab * [ADDED] Above removed pages into ACL Settings Tab This will make usage of ACLs a bit easier and transparent. Also fixes #1731 once merged.
19 lines
494 B
PHP
19 lines
494 B
PHP
<?php
|
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
|
|
|
// ACL check
|
|
switch($setting->getValue('acl_about_page', 1)) {
|
|
case '0':
|
|
if ($user->isAuthenticated()) {
|
|
$smarty->assign("CONTENT", "default.tpl");
|
|
}
|
|
break;
|
|
case '1':
|
|
$smarty->assign("CONTENT", "default.tpl");
|
|
break;
|
|
case '2':
|
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Page currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
|
$smarty->assign("CONTENT", "disabled.tpl");
|
|
break;
|
|
}
|