3 my $curuser = $FS::CurrentUser::CurrentUser;
4 die "access denied\n" unless $curuser->access_right('Configuration');
6 my $fsconf = new FS::Conf;
7 if ( $fsconf->exists('disable_settings_changes') ) {
8 my @changers = split(/\s*,\s*/, $fsconf->config('disable_settings_changes'));
9 my %changers = map { $_=>1 } @changers;
10 unless ( $changers{$curuser->username} ) {
11 errorpage("Disabled in web demo");
12 die "shouldn't be reached";
16 $cgi->param('confnum') =~ /^(\d+)$/ or die "illegal or missing confnum";
19 my $conf = qsearchs('conf', {'confnum' => $confnum});
20 die "Configuration not found!" unless $conf;
23 my $redirect = popurl(2);
24 if ( $cgi->param('redirect') eq 'config_view_showagent' ) {
25 $redirect .= 'config/config-view.cgi?showagent=1#'. $conf->name;
26 } elsif ( $cgi->param('redirect') eq 'config_view' ) {
27 $redirect .= 'config/config-view.cgi';
29 $redirect .= 'browse/agent.cgi';
33 <% $cgi->redirect($redirect) %>