[freeside-commits] branch FREESIDE_3_BRANCH updated. 2d4b04cdc9c7db210398bf55abce5d5ee3a899e3
Ivan Kohler
ivan at freeside.biz
Mon Nov 9 13:36:48 PST 2020
The branch, FREESIDE_3_BRANCH has been updated
via 2d4b04cdc9c7db210398bf55abce5d5ee3a899e3 (commit)
from c855c5c3137c69bba8e801d14fcbe6821accd2ce (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 2d4b04cdc9c7db210398bf55abce5d5ee3a899e3
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Nov 9 13:36:47 2020 -0800
ACL for hardware class config, RT#85057
diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm
index ca3c46a46..160701361 100644
--- a/FS/FS/AccessRight.pm
+++ b/FS/FS/AccessRight.pm
@@ -414,6 +414,8 @@ tie my %rights, 'Tie::IxHash',
{ rightname=>'Alarm configuration' },
{ rightname=>'Alarm global configuration', global=>1 },
+ { rightname=>'Edit hardware classes and types' },
+
{ rightname=> 'Configure network monitoring', global=>1 },
#{ rightname=>'Edit employees', global=>1, },
diff --git a/FS/FS/access_right.pm b/FS/FS/access_right.pm
index 955817c80..442a871fe 100644
--- a/FS/FS/access_right.pm
+++ b/FS/FS/access_right.pm
@@ -258,6 +258,7 @@ sub _upgrade_data { # class method
'List customers' => 'Customers: Customer churn report',
'Edit customer' => 'Edit customer invoice terms',
'Financial reports' => 'Basic payment and refund reports',
+ 'Configuration' => 'Edit hardware clases and types',
);
# foreach my $old_acl ( keys %onetime ) {
diff --git a/httemplate/browse/hardware_class.html b/httemplate/browse/hardware_class.html
index 0bf314e3f..6423f4a25 100644
--- a/httemplate/browse/hardware_class.html
+++ b/httemplate/browse/hardware_class.html
@@ -22,7 +22,7 @@
my $curuser = $FS::CurrentUser::CurrentUser;
die "access denied"
- unless $curuser->access_right('Configuration');
+ unless $curuser->access_right('Edit hardware classes and types');
my $menubar =
[ 'Hardware statuses' => $p.'browse/hardware_status.html',
diff --git a/httemplate/browse/hardware_status.html b/httemplate/browse/hardware_status.html
index 89ae83035..64ad5ad7f 100644
--- a/httemplate/browse/hardware_status.html
+++ b/httemplate/browse/hardware_status.html
@@ -16,7 +16,7 @@
my $curuser = $FS::CurrentUser::CurrentUser;
die "access denied"
- unless $curuser->access_right('Configuration');
+ unless $curuser->access_right('Edit hardware classes and types');
my $menubar = [ 'Hardware classes' => $p.'browse/hardware_class.html',
'Add a status' => $p.'edit/hardware_status.html' ];
diff --git a/httemplate/edit/hardware_class.html b/httemplate/edit/hardware_class.html
index 26f487dda..8d5412bd2 100644
--- a/httemplate/edit/hardware_class.html
+++ b/httemplate/edit/hardware_class.html
@@ -11,6 +11,6 @@
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+ unless $FS::CurrentUser::CurrentUser->access_right('Edit hardware classes and types');
</%init>
diff --git a/httemplate/edit/hardware_status.html b/httemplate/edit/hardware_status.html
index 23e5b6eba..c8cb68cd4 100644
--- a/httemplate/edit/hardware_status.html
+++ b/httemplate/edit/hardware_status.html
@@ -19,6 +19,6 @@
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+ unless $FS::CurrentUser::CurrentUser->access_right('Edit hardware classes and types');
</%init>
diff --git a/httemplate/edit/process/hardware_class.html b/httemplate/edit/process/hardware_class.html
index 64bc72efe..54e2af694 100644
--- a/httemplate/edit/process/hardware_class.html
+++ b/httemplate/edit/process/hardware_class.html
@@ -6,6 +6,6 @@
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+ unless $FS::CurrentUser::CurrentUser->access_right('Edit hardware classes and types');
</%init>
diff --git a/httemplate/edit/process/hardware_status.html b/httemplate/edit/process/hardware_status.html
index 61f02e215..d790eb5ba 100644
--- a/httemplate/edit/process/hardware_status.html
+++ b/httemplate/edit/process/hardware_status.html
@@ -6,6 +6,6 @@
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+ unless $FS::CurrentUser::CurrentUser->access_right('Edit hardware classes and types');
</%init>
diff --git a/httemplate/edit/process/hardware_type.html b/httemplate/edit/process/hardware_type.html
index 52787011c..954e76d03 100644
--- a/httemplate/edit/process/hardware_type.html
+++ b/httemplate/edit/process/hardware_type.html
@@ -6,6 +6,6 @@
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+ unless $FS::CurrentUser::CurrentUser->access_right('Edit hardware classes and types');
</%init>
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index ca7be2736..0c159951d 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -658,7 +658,7 @@ $config_export_svc{'Circuits'} = [ \%config_circuit, '' ]
$config_export_svc{'Fiber'} = [ \%config_fiber, '' ]
if $curuser->access_right('Configuration');
$config_export_svc{'Hardware types'} = [ $fsurl.'browse/hardware_class.html', 'Set up hardware type catalog' ]
- if $curuser->access_right('Configuration');
+ if $curuser->access_right('Edit hardware classes and types');
tie my %config_pkg_reason, 'Tie::IxHash',
'Cancel reasons' => [ $fsurl.'browse/reason.html?class=C', 'Cancel reasons explain why a service was cancelled.' ],
-----------------------------------------------------------------------
Summary of changes:
FS/FS/AccessRight.pm | 2 ++
FS/FS/access_right.pm | 1 +
httemplate/browse/hardware_class.html | 2 +-
httemplate/browse/hardware_status.html | 2 +-
httemplate/edit/hardware_class.html | 2 +-
httemplate/edit/hardware_status.html | 2 +-
httemplate/edit/process/hardware_class.html | 2 +-
httemplate/edit/process/hardware_status.html | 2 +-
httemplate/edit/process/hardware_type.html | 2 +-
httemplate/elements/menu.html | 2 +-
10 files changed, 11 insertions(+), 8 deletions(-)
More information about the freeside-commits
mailing list