X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-process.cgi;h=c96f8d44d86df77ccf3b3d9c6c4e2df10ce80a03;hp=788d9016e91006d7f205bc5bb5f362c865bab561;hb=dad1e2689ba5ff448bf1bbc9a586023137864d12;hpb=a91c47d734219f046c881662225cd3f00a3f2e92 diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi index 788d9016e..c96f8d44d 100644 --- a/httemplate/config/config-process.cgi +++ b/httemplate/config/config-process.cgi @@ -70,10 +70,21 @@ my %namecol = ( ); <%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 $conf = new FS::Conf; + +if ( $conf->exists('disable_settings_changes') ) { + my @changers = split(/\s*,\s*/, $conf->config('disable_settings_changes')); + my %changers = map { $_=>1 } @changers; + unless ( $changers{$curuser->username} ) { + errorpage("Disabled in web demo"); + die "shouldn't be reached"; + } +} + $FS::Conf::DEBUG = 1; my @config_items = grep { $_->key != ~/^invoice_(html|latex|template)/ } $conf->config_items;