summaryrefslogtreecommitdiff
path: root/FS/FS/access_right.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-09-07 17:39:00 -0700
committerIvan Kohler <ivan@freeside.biz>2013-09-07 17:39:00 -0700
commitee7bb8218d50ca38148427c9b24a8decbd3ace86 (patch)
treef0e242c61544912b1ef74b6dabfc9e7d3f6d0811 /FS/FS/access_right.pm
parentecd1baba392d971b49a50f133349f85aaec548a0 (diff)
start svc_alarm, RT#23694
Diffstat (limited to 'FS/FS/access_right.pm')
-rw-r--r--FS/FS/access_right.pm20
1 files changed, 14 insertions, 6 deletions
diff --git a/FS/FS/access_right.pm b/FS/FS/access_right.pm
index 85334ed..289660f 100644
--- a/FS/FS/access_right.pm
+++ b/FS/FS/access_right.pm
@@ -187,7 +187,8 @@ sub _upgrade_data { # class method
my @all_groups = qsearch('access_group', {});
- tie my %onetime, 'Tie::IxHash',
+ #tie my %onetime, 'Tie::IxHash',
+ my @onetime = (
'List customers' => 'List all customers',
'List all customers' => 'Advanced customer search',
'List packages' => 'Summarize packages',
@@ -224,6 +225,8 @@ sub _upgrade_data { # class method
'Services: Hardware' => 'Services: Hardware: Advanced search',
'Services: Phone numbers' => 'Services: Phone numbers: Advanced search',
+ 'Services: Accounts' => 'Services: Alarm services',
+
'List rating data' => [ 'Usage: RADIUS sessions',
'Usage: Call Detail Records (CDRs)',
'Usage: Unrateable CDRs',
@@ -236,13 +239,18 @@ sub _upgrade_data { # class method
'Services: Accounts' => 'Services: Cable Subscribers',
'Bulk change customer packages' => 'Bulk move customer services',
'Configuration' => 'Edit sales people',
-;
+ );
+
+# foreach my $old_acl ( keys %onetime ) {
+#
+# my @new_acl = ref($onetime{$old_acl})
+# ? @{ $onetime{$old_acl} }
+# : ( $onetime{$old_acl} );
- foreach my $old_acl ( keys %onetime ) {
+ while ( @onetime ) {
- my @new_acl = ref($onetime{$old_acl})
- ? @{ $onetime{$old_acl} }
- : ( $onetime{$old_acl} );
+ my( $old_acl, $new_acl ) = splice(@onetime, 0, 2);
+ my @new_acl = ref($new_acl) ? @$new_acl : ( $new_acl );
foreach my $new_acl ( @new_acl ) {