X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Faccess_right.pm;h=14a60981e7370f1e300724cf4c18639863dfe085;hb=85f0e2caa759102f68fe28278faf5f65c7b33b3c;hp=4931c7f485b12375bc588d3e1e70b9c54edbccf1;hpb=61a84d1b2dc076e80dec0b96bc9867ad4215e374;p=freeside.git diff --git a/FS/FS/access_right.pm b/FS/FS/access_right.pm index 4931c7f48..14a60981e 100644 --- a/FS/FS/access_right.pm +++ b/FS/FS/access_right.pm @@ -5,6 +5,7 @@ use vars qw( @ISA ); use Tie::IxHash; use FS::Record qw( qsearch qsearchs ); use FS::upgrade_journal; +use FS::access_group; @ISA = qw(FS::Record); @@ -240,6 +241,17 @@ sub _upgrade_data { # class method 'Bulk change customer packages' => 'Bulk move customer services', 'Configuration' => 'Edit sales people', 'Configuration' => 'Alarm global configuration', + 'Edit global package definitions' => 'Edit package definition costs', + 'Configuration' => 'Edit global fee definitions', + 'Edit package definition costs' => 'View package definition costs', + 'List prospects' => 'List contacts', + 'List customers' => 'List contacts', + 'Backdate payment' => 'Backdate credit', + 'Generate quotation' => 'Disable quotation', + 'Void credit' => 'Void credit', + 'Unvoid credit' => 'Unvoid credit', + 'Add on-the-fly void credit reason' => 'Add on-the-fly void credit reason', + '_ALL' => 'Employee preference telephony integration', ); # foreach my $old_acl ( keys %onetime ) { @@ -260,7 +272,7 @@ sub _upgrade_data { # class method # grant $new_acl to all groups who have $old_acl for my $group (@all_groups) { - next unless $group->access_right($old_acl); + next unless $old_acl eq '_ALL' || $group->access_right($old_acl); next if $group->access_right($new_acl); my $access_right = FS::access_right->new( { 'righttype' => 'FS::access_group', @@ -282,6 +294,7 @@ sub _upgrade_data { # class method # grant to everyone for my $group (@all_groups) { + next if $group->access_right('Download report data'); my $access_right = FS::access_right->new( { 'righttype' => 'FS::access_group', 'rightobjnum' => $group->groupnum,