From: Ivan Kohler Date: Wed, 6 Aug 2014 22:37:00 +0000 (-0700) Subject: public demo RT pref disable hack X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=921fcc8e5e3f1ab55f81c01f2e70c170e223cdce public demo RT pref disable hack --- diff --git a/rt/share/html/Prefs/Other.html b/rt/share/html/Prefs/Other.html index 15f5dfd30..93e85d523 100644 --- a/rt/share/html/Prefs/Other.html +++ b/rt/share/html/Prefs/Other.html @@ -89,6 +89,10 @@ if (defined($PreferredKey) and (not $UserObj->FirstAttribute('PreferredKey') } if ( $Update ) { + my $fsconf = eval { FS::Conf->new }; + if ( $fsconf && $fsconf->exists('disable_acl_changes') ) { + push @results, loc("Preference changes disabled in public demo."); + } else { $preferences ||= {}; $m->comp( '/Widgets/BulkProcess', Meta => { map { $_ => RT->Config->Meta($_) } RT->Config->Options @@ -101,6 +105,7 @@ if ( $Update ) { my ($ok, $msg) = $UserObj->SetPreferences( $RT::System, $preferences ); push @results, $ok ? loc("Preferences saved.") : $msg; + } } <%ARGS>