[freeside-commits] branch FREESIDE_3_BRANCH updated. d17420aa6024c993fb785c455669518ef8befd32

Ivan ivan at 420.am
Sat Feb 15 14:42:39 PST 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  d17420aa6024c993fb785c455669518ef8befd32 (commit)
      from  77717df2bec3d3ad9176537e728fe5a4fed15eba (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 d17420aa6024c993fb785c455669518ef8befd32
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Feb 15 14:42:35 2014 -0800

    add "Edit package definition costs" ACL, RT#27140

diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm
index 0d8795b..b60db22 100644
--- a/FS/FS/AccessRight.pm
+++ b/FS/FS/AccessRight.pm
@@ -351,7 +351,8 @@ tie my %rights, 'Tie::IxHash',
 
     'Edit package definitions',
     { rightname=>'Edit global package definitions', global=>1 },
-  
+    'Edit package definition costs',
+
     'Bulk edit package definitions',
 
     'Edit billing events',
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 0e1e993..17c45b8 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -176,8 +176,15 @@
                               { type  => 'tablebreak-tr-title',
                                 value => 'Cost tracking', #better name?
                               },
-                              { field=>'setup_cost', type=>'money', },
-                              { field=>'recur_cost', type=>'money', },
+
+                              ( $curuser->access_right('Edit package definition costs')
+                                ? ( { field=>'setup_cost', type=>'money', },
+                                    { field=>'recur_cost', type=>'money', },
+                                  )
+                                : ( { field=>'setup_cost', type=>'fixed', },
+                                    { field=>'recur_cost', type=>'fixed', },
+                                  )
+                              ),
 
                               ( $conf->exists('part_pkg-delay_start')
                                 ? ( { type  => 'tablebreak-tr-title',

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/AccessRight.pm         |    3 ++-
 httemplate/edit/part_pkg.cgi |   11 +++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list