[freeside-commits] branch FREESIDE_4_BRANCH updated. d8e13cab5be7de84da8fa8bb61f89c3edb4c5ef7
Ivan
ivan at 420.am
Fri Jun 2 14:22:24 PDT 2017
The branch, FREESIDE_4_BRANCH has been updated
via d8e13cab5be7de84da8fa8bb61f89c3edb4c5ef7 (commit)
from 67438dccad6bd9a800f6ab6a179aaad1598eae3a (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 d8e13cab5be7de84da8fa8bb61f89c3edb4c5ef7
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Jun 2 14:22:24 2017 -0700
separate ACL for editing customer invoice terms, RT#75759
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 5956314..d11fdad 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -377,6 +377,10 @@ sub insert {
join(', ', map { "$_: $options{$_}" } keys %options ). "\n"
if $DEBUG;
+ return "You are not permitted to change customer invoicing terms."
+ if $self->invoice_terms #i.e. not the default
+ && ! $FS::CurrentUser::CurrentUser->access_right('Edit customer invoice terms');
+
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{QUIT} = 'IGNORE';
@@ -1382,6 +1386,10 @@ sub replace {
&& ! $self->locale
&& $conf->exists('cust_main-require_locale');
+ return "You are not permitted to change customer invoicing terms."
+ if $old->invoice_terms ne $self->invoice_terms
+ && ! $curuser->access_right('Edit customer invoice terms');
+
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{QUIT} = 'IGNORE';
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main.pm | 8 ++++++++
1 file changed, 8 insertions(+)
More information about the freeside-commits
mailing list