better disable_acl_changes
authorivan <ivan>
Sun, 6 Jun 2010 06:05:12 +0000 (06:05 +0000)
committerivan <ivan>
Sun, 6 Jun 2010 06:05:12 +0000 (06:05 +0000)
httemplate/edit/process/access_user.html
httemplate/pref/pref-process.html

index ca6bb60..1e2e098 100644 (file)
@@ -1,3 +1,6 @@
+% if ( $conf->exists('disable_acl_changes') ) {
+  ACL changes disabled in public demo.
+% } else {
 %  if ( $cgi->param('_password') ne $cgi->param('_password2') ) {
 %    $cgi->param('error', "The passwords do not match");
 %    print $cgi->redirect(popurl(2) . "access_user.html?" . $cgi->query_string);
@@ -13,6 +16,7 @@
              )
 %>
 %   }
+% }
 <%init>
 
 die "access denied"
index 47f80af..a340b7f 100644 (file)
@@ -7,6 +7,11 @@
 % }
 <%init>
 
+if ( FS::Conf->new->exists('disable_acl_changes') ) {
+  errorpage("Preference changes disabled in public demo");
+  die "shouldn't be reached";
+}
+
 my $error = '';
 my $access_user = '';