mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Allow a username. Default to _SESSION['Username']
This commit is contained in:
parent
ecae7e91a3
commit
0b013ef040
@ -61,6 +61,18 @@ $priv_list['user-copy-files']['descr'] = "Indicates whether the user is allowed
|
||||
"If you are going to use this privilege, you must install ".
|
||||
"scponly on the appliance (Hint: pkg_add -r scponly).";
|
||||
|
||||
$priv_list['user-l2tp-dialin'] = array();
|
||||
$priv_list['user-l2tp-dialin']['name'] = "User - L2TP Dialin";
|
||||
$priv_list['user-l2tp-dialin']['descr'] = "Indicates whether the user is allowed to dial in via L2TP";
|
||||
|
||||
$priv_list['user-pptp-dialin'] = array();
|
||||
$priv_list['user-pptp-dialin']['name'] = "User - PPTP Dialin";
|
||||
$priv_list['user-pptp-dialin']['descr'] = "Indicates whether the user is allowed to dial in via PPTP";
|
||||
|
||||
$priv_list['user-pppoe-dialin'] = array();
|
||||
$priv_list['user-pppoe-dialin']['name'] = "User - PPPOE Dialin";
|
||||
$priv_list['user-pppoe-dialin']['descr'] = "Indicates whether the user is allowed to dial in via PPPOE";
|
||||
|
||||
sort_privs($priv_list);
|
||||
|
||||
function cmp_privkeys($a, $b) {
|
||||
@ -163,10 +175,9 @@ function get_user_privdesc(& $user) {
|
||||
return $privs;
|
||||
}
|
||||
|
||||
function isAllowedPage($page) {
|
||||
function isAllowedPage($page, $username = $_SESSION['Username']) {
|
||||
global $_SESSION;
|
||||
|
||||
$username = $_SESSION['Username'];
|
||||
if (!isset($username))
|
||||
return false;
|
||||
|
||||
@ -248,4 +259,4 @@ function getAllowedPages($username) {
|
||||
return $allowed_pages;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user