summaryrefslogtreecommitdiff
path: root/httemplate/config/config-delete.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/config/config-delete.cgi')
-rw-r--r--httemplate/config/config-delete.cgi15
1 files changed, 13 insertions, 2 deletions
diff --git a/httemplate/config/config-delete.cgi b/httemplate/config/config-delete.cgi
index a05cb1e14..488886824 100644
--- a/httemplate/config/config-delete.cgi
+++ b/httemplate/config/config-delete.cgi
@@ -1,6 +1,17 @@
<%init>
-die "access denied\n"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+die "access denied\n" unless $curuser->access_right('Configuration');
+
+my $fsconf = new FS::Conf;
+if ( $fsconf->exists('disable_settings_changes') ) {
+ my @changers = split(/\s*,\s*/, $fsconf->config('disable_settings_changes'));
+ my %changers = map { $_=>1 } @changers;
+ unless ( $changers{$curuser->username} ) {
+ errorpage("Disabled in web demo");
+ die "shouldn't be reached";
+ }
+}
$cgi->param('confnum') =~ /^(\d+)$/ or die "illegal or missing confnum";
my $confnum = $1;