summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_groupmanager_addprivs.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/local/www/system_groupmanager_addprivs.php')
-rw-r--r--src/usr/local/www/system_groupmanager_addprivs.php34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/usr/local/www/system_groupmanager_addprivs.php b/src/usr/local/www/system_groupmanager_addprivs.php
index 5c25e59..c165078 100644
--- a/src/usr/local/www/system_groupmanager_addprivs.php
+++ b/src/usr/local/www/system_groupmanager_addprivs.php
@@ -28,6 +28,7 @@
##|*IDENT=page-system-groupmanager-addprivs
##|*NAME=System: Group Manager: Add Privileges
##|*DESCR=Allow access to the 'System: Group Manager: Add Privileges' page.
+##|*WARN=standard-warning-root
##|*MATCH=system_groupmanager_addprivs.php*
##|-PRIV
@@ -111,6 +112,20 @@ function build_priv_list() {
return($list);
}
+function get_root_priv_item_text() {
+ global $priv_list;
+
+ $priv_text = "";
+
+ foreach ($priv_list as $pname => $pdata) {
+ if (isset($pdata['warn']) && ($pdata['warn'] == 'standard-warning-root')) {
+ $priv_text .= '<br/>' . $pdata['name'];
+ }
+ }
+
+ return($priv_text);
+}
+
include("head.inc");
if ($input_errors) {
@@ -161,6 +176,19 @@ $section->addInput(new Form_Input(
null
))->setHelp('Show only the choices containing this term');
+$section->addInput(new Form_StaticText(
+ gettext('Privilege information'),
+ '<span class="help-block">'.
+ gettext('The following privileges effectively give administrator-level access to users in the group' .
+ ' because the user gains access to execute general commands, edit system files, ' .
+ ' modify users, change passwords or similar:') .
+ '<br/>' .
+ get_root_priv_item_text() .
+ '<br/><br/>' .
+ gettext('Please take care when granting these privileges.') .
+ '</span>'
+));
+
$btnfilter = new Form_Button(
'btnfilter',
'Filter',
@@ -205,7 +233,11 @@ events.push(function() {
continue;
}
- $desc = addslashes(preg_replace("/pfSense/i", $g['product_name'], $pdata['descr']));
+ $desc = preg_replace("/pfSense/i", $g['product_name'], $pdata['descr']);
+ if (isset($pdata['warn']) && ($pdata['warn'] == 'standard-warning-root')) {
+ $desc .= ' ' . gettext('(This privilege effectively gives administrator-level access to users in the group)');
+ }
+ $desc = addslashes($desc);
$jdescs .= "descs[{$id}] = '{$desc}';\n";
$id++;
}
OpenPOWER on IntegriCloud