diff options
author | sullrich <sullrich@pfsense.org> | 2009-12-02 21:52:44 -0500 |
---|---|---|
committer | sullrich <sullrich@pfsense.org> | 2009-12-02 21:52:44 -0500 |
commit | 0b013ef040e36dd71f6b9ca94aa657d2619309f3 (patch) | |
tree | 58448ec94510877dcbd5d51386cbb38b5636869d | |
parent | ecae7e91a34e6095f40f200c5ebbe46c1abae28b (diff) | |
download | pfsense-0b013ef040e36dd71f6b9ca94aa657d2619309f3.zip pfsense-0b013ef040e36dd71f6b9ca94aa657d2619309f3.tar.gz |
Allow a username. Default to _SESSION['Username']
-rw-r--r-- | etc/inc/priv.inc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/etc/inc/priv.inc b/etc/inc/priv.inc index 9afaa78..b27c0f6 100644 --- a/etc/inc/priv.inc +++ b/etc/inc/priv.inc @@ -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; } -?> +?>
\ No newline at end of file |