+ tie my %onetime, 'Tie::IxHash',
+ 'List customers' => 'List all customers',
+ 'List all customers' => 'Advanced customer search',
+ 'List packages' => 'Summarize packages',
+ 'Post payment' => 'Backdate payment',
+ 'Cancel customer package immediately' => 'Un-cancel customer package',
+ 'Suspend customer package' => 'Suspend customer',
+ 'Unsuspend customer package' => 'Unsuspend customer',
+ 'New prospect' => 'Generate quotation',
+ 'Delete invoices' => 'Void invoices',
+ 'List invoices' => 'List quotations',
+ 'Post credit' => 'Credit line items',
+ #'View customer tax exemptions' => 'Edit customer tax exemptions',
+ 'Edit customer' => 'Edit customer tax exemptions',
+ 'Edit package definitions' => 'Bulk edit package definitions',
+
+ 'List services' => [ 'Services: Accounts',
+ 'Services: Domains',
+ 'Services: Certificates',
+ 'Services: Mail forwards',
+ 'Services: Virtual hosting services',
+ 'Services: Wireless broadband services',
+ 'Services: DSLs',
+ 'Services: Dish services',
+ 'Services: Hardware',
+ 'Services: Phone numbers',
+ 'Services: PBXs',
+ 'Services: Ports',
+ 'Services: Mailing lists',
+ 'Services: External services',
+ ],
+
+ 'Services: Accounts' => 'Services: Accounts: Advanced search',
+ 'Services: Wireless broadband services' => 'Services: Wireless broadband services: Advanced search',
+ 'Services: Hardware' => 'Services: Hardware: Advanced search',
+ 'Services: Phone numbers' => 'Services: Phone numbers: Advanced search',
+
+ 'List rating data' => [ 'Usage: RADIUS sessions',
+ 'Usage: Call Detail Records (CDRs)',
+ 'Usage: Unrateable CDRs',
+ ],
+ 'Provision customer service' => [ 'Edit password' ],
+ 'Financial reports' => [ 'Employees: Commission Report',
+ 'Employees: Audit Report',
+ ],
+ 'Change customer package' => 'Detach customer package',
+ 'Services: Accounts' => 'Services: Cable Subscribers',
+ 'Bulk change customer packages' => 'Bulk move customer services',
+;
+
+ foreach my $old_acl ( keys %onetime ) {
+
+ my @new_acl = ref($onetime{$old_acl})
+ ? @{ $onetime{$old_acl} }
+ : ( $onetime{$old_acl} );
+
+ foreach my $new_acl ( @new_acl ) {
+
+ ( my $journal = 'ACL_'.lc($new_acl) ) =~ s/\W/_/g;
+ next if FS::upgrade_journal->is_done($journal);
+
+ # grant $new_acl to all groups who have $old_acl
+ for my $group (@all_groups) {
+ next unless $group->access_right($old_acl);
+ next if $group->access_right($new_acl);