[freeside-commits] branch FREESIDE_3_BRANCH updated. 5b55f642a6c0a3e0e2d3c35414cb7da9ac1578f4
Ivan
ivan at 420.am
Tue Jun 16 20:48:03 PDT 2015
The branch, FREESIDE_3_BRANCH has been updated
via 5b55f642a6c0a3e0e2d3c35414cb7da9ac1578f4 (commit)
from c5cd727ec675c94397e5d54abdeed6709050191e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5b55f642a6c0a3e0e2d3c35414cb7da9ac1578f4
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Jun 16 20:48:01 2015 -0700
disable virtual field access by default until it is working, RT#35178
diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm
index 71db3f2..956d5d3 100644
--- a/FS/FS/AccessRight.pm
+++ b/FS/FS/AccessRight.pm
@@ -404,6 +404,8 @@ tie my %rights, 'Tie::IxHash',
#{ rightname=>'Edit employees', global=>1, },
#{ rightname=>'Edit employee groupss', global=>1, },
+ { rightname=>'Edit custom fields', global=>1 },
+
{ rightname=>'Configuration', global=>1 }, #most of the rest of the configuraiton is not agent-virtualized
{ rightname=>'Configuration download', }, #description of how it affects
diff --git a/httemplate/browse/part_virtual_field.html b/httemplate/browse/part_virtual_field.html
index 1d8fad4..5e38762 100644
--- a/httemplate/browse/part_virtual_field.html
+++ b/httemplate/browse/part_virtual_field.html
@@ -30,6 +30,6 @@
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+ unless $FS::CurrentUser::CurrentUser->access_right('Edit custom fields');
</%init>
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index 34bba7e..b4d019a 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -737,10 +737,10 @@ $config_misc{'Message templates'} = [ $fsurl.'browse/msg_template.html', 'Templa
$config_misc{'Advertising sources'} = [ $fsurl.'browse/part_referral.html', 'Where a customer heard about your service.' ]
if $curuser->access_right('Edit advertising sources')
|| $curuser->access_right('Edit global advertising sources');
-if ( $curuser->access_right('Configuration') ) {
- $config_misc{'Custom fields'} = [ $fsurl.'browse/part_virtual_field.html', 'Locally defined fields', ];
- $config_misc{'Translation strings'} = [ $fsurl.'browse/msgcat.html', 'Translations and other customizable labels for each locale' ];
-}
+$config_misc{'Custom fields'} = [ $fsurl.'browse/part_virtual_field.html', 'Locally defined fields', ]
+ if $curuser->access_right('Edit custom fields');
+$config_misc{'Translation strings'} = [ $fsurl.'browse/msgcat.html', 'Translations and other customizable labels for each locale' ]
+ if $curuser->access_right('Configuration');
$config_misc{'Inventory classes and inventory'} = [ $fsurl.'browse/inventory_class.html', 'Setup inventory classes and stock inventory' ]
if $curuser->access_right('Edit inventory')
|| $curuser->access_right('Edit global inventory')
-----------------------------------------------------------------------
Summary of changes:
FS/FS/AccessRight.pm | 2 ++
httemplate/browse/part_virtual_field.html | 2 +-
httemplate/elements/menu.html | 8 ++++----
3 files changed, 7 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list