disable virtual field access by default until it is working, RT#35178
authorIvan Kohler <ivan@freeside.biz>
Wed, 17 Jun 2015 03:48:01 +0000 (20:48 -0700)
committerIvan Kohler <ivan@freeside.biz>
Wed, 17 Jun 2015 03:48:01 +0000 (20:48 -0700)
FS/FS/AccessRight.pm
httemplate/browse/part_virtual_field.html
httemplate/elements/menu.html

index 71db3f2..956d5d3 100644 (file)
@@ -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
index 1d8fad4..5e38762 100644 (file)
@@ -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>
index 34bba7e..b4d019a 100644 (file)
@@ -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')