From 2d7e57036577c272ce0e9ee4c7e3985a4b3adf22 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 6 Aug 2014 15:36:58 -0700 Subject: [PATCH] public demo RT pref disable hack --- rt/share/html/Prefs/Other.html | 5 +++++ 1 file changed, 5 insertions(+) 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> -- 2.11.0