From: Ivan Kohler Date: Wed, 6 Aug 2014 22:36:58 +0000 (-0700) Subject: public demo RT pref disable hack X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2d7e57036577c272ce0e9ee4c7e3985a4b3adf22 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>