projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b8d03e4
)
add a config value for disabling the ACLs... this should be good for a demo in 1...
author
ivan
<ivan>
Sun, 18 May 2008 06:50:07 +0000
(06:50 +0000)
committer
ivan
<ivan>
Sun, 18 May 2008 06:50:07 +0000
(06:50 +0000)
FS/FS/Conf.pm
patch
|
blob
|
history
httemplate/edit/process/access_group.html
patch
|
blob
|
history
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
73ca907
..
eb0574d
100644
(file)
--- a/
FS/FS/Conf.pm
+++ b/
FS/FS/Conf.pm
@@
-2264,6
+2264,13
@@
worry that config_items is freeside-specific and icky.
'type' => 'checkbox',
},
'type' => 'checkbox',
},
+ {
+ 'key' => 'disable_acl_changes',
+ 'section' => '',
+ 'description' => 'Disable all ACL changes, for demos.',
+ 'type' => 'checkbox',
+ },
+
);
1;
);
1;
diff --git
a/httemplate/edit/process/access_group.html
b/httemplate/edit/process/access_group.html
index
581b50f
..
ab25cb3
100644
(file)
--- a/
httemplate/edit/process/access_group.html
+++ b/
httemplate/edit/process/access_group.html
@@
-1,3
+1,6
@@
+% if ( $conf->exists('disable_acl_changes') ) {
+ ACL changes disabled in public demo.
+% } else {
<% include( 'elements/process.html',
'table' => 'access_group',
'viewall_dir' => 'browse',
<% include( 'elements/process.html',
'table' => 'access_group',
'viewall_dir' => 'browse',
@@
-14,3
+17,12
@@
},
)
%>
},
)
%>
+% }
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my $conf = new FS::Conf;
+
+</%init>