diff options
author | ivan <ivan> | 2008-05-18 06:50:35 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-05-18 06:50:35 +0000 |
commit | 17fc101a8d0e4d2f22b8a2edb4d768b4ffe3fb15 (patch) | |
tree | 27ec2fdf8c6f323a8e5ce9107f025f1aa53de5f4 | |
parent | 5fc309a5e209071f863b3c6c12e7088c2c9e4eff (diff) |
add a config value for disabling the ACLs... this should be good for a demo in 1.7, 1.9 will need some way to disable ACL changes from OUTSIDE the db
-rw-r--r-- | FS/FS/Conf.pm | 14 | ||||
-rw-r--r-- | httemplate/edit/process/access_group.html | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 2a1a037ce..3e88f979c 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2261,6 +2261,20 @@ worry that config_items is freeside-specific and icky. 'type' => 'checkbox', }, + { + 'key' => 'disable_acl_changes', + 'section' => '', + 'description' => 'Disable all ACL changes, for demos.', + 'type' => 'checkbox', + }, + + { + 'key' => 'disable_acl_changes', + 'section' => '', + 'description' => 'Disable all ACL changes, for demos.', + 'type' => 'checkbox', + }, + ); 1; diff --git a/httemplate/edit/process/access_group.html b/httemplate/edit/process/access_group.html index c80311586..8b0df304a 100644 --- 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', @@ -13,3 +16,12 @@ }, ) %> +% } +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $conf = new FS::Conf; + +</%init> |