X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FAccessRight.pm;h=44235b113e7a6a8c2b72177139a68d884ab3d0d0;hb=d84fbd3987192e9bece5fc074dd7507dd1e2c7b7;hp=9ef35249c58aff2ef509d1eaabc6557e96dea867;hpb=b96629eb08231f78f334f78c0bd6c277c60844fa;p=freeside.git diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index 9ef35249c..44235b113 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -94,11 +94,10 @@ tie my %rights, 'Tie::IxHash', 'View customer', #'View Customer | View tickets', 'Edit customer', + 'View customer history', 'Cancel customer', 'Complimentary customer', #aka users-allow_comp { rightname=>'Delete customer', desc=>"Enable customer deletions. Be very careful! Deleting a customer will remove all traces that this customer ever existed! It should probably only be used when auditing a legacy database. Normally, you cancel all of a customer's packages if they cancel service." }, #aka. deletecustomers - 'Add customer note', #NEW - 'Edit customer note', #NEW 'Bill customer now', #NEW 'Bulk send customer notices', #NEW ], @@ -119,6 +118,7 @@ tie my %rights, 'Tie::IxHash', 'Unsuspend customer package', 'Cancel customer package immediately', 'Cancel customer package later', + 'Delay suspension events', 'Add on-the-fly cancel reason', #NEW 'Add on-the-fly suspend reason', #NEW 'Edit customer package invoice details', #NEW @@ -139,6 +139,7 @@ tie my %rights, 'Tie::IxHash', 'Edit www config', #NEW 'Edit domain catchall', #NEW 'Edit domain nameservice', #NEW + 'Manage domain registration', { rightname=>'View/link unlinked services', global=>1 }, #not agent-virtualizable without more work ], @@ -149,8 +150,12 @@ tie my %rights, 'Tie::IxHash', 'Customer invoice / financial info rights' => [ 'View invoices', 'Resend invoices', #NEWNEW + 'Delete invoices', #new, but no need to phase in 'View customer tax exemptions', #yow + 'Add customer tax adjustment', #new, but no need to phase in 'View customer batched payments', #NEW + 'View customer pending payments', #NEW + 'Edit customer pending payments', #NEW 'View customer billing events', #NEW ], @@ -194,6 +199,22 @@ tie my %rights, 'Tie::IxHash', ], + + ### + # note/attachment rights... + ### + 'Customer note and attachment rights' => [ + 'Add customer note', #NEW + 'Edit customer note', #NEW + 'View attachments', + 'Download attachment', #NEW + 'Add attachment', #NEW + 'Edit attachment', #NEW + 'Delete attachment', #NEW + 'View deleted attachments', #NEW + 'Undelete attachment', #NEW + 'Purge attachment', #NEW + ], ### # report/listing rights... @@ -207,6 +228,7 @@ tie my %rights, 'Tie::IxHash', { rightname=> 'List rating data', desc=>'Usage reports', global=>1 }, 'Billing event reports', + 'Receivables report', 'Financial reports', ], @@ -218,8 +240,10 @@ tie my %rights, 'Tie::IxHash', { rightname=>'Time queue', global=>1 }, { rightname=>'Process batches', global=>1 }, { rightname=>'Reprocess batches', global=>1 }, + { rightname=>'Redownload resolved batches', global=>1 }, { rightname=>'Import', global=>1 }, #some of these are ag-virt'ed now? give em their own ACLs { rightname=>'Export', global=>1 }, + { rightname=> 'Edit rating data', desc=>'Delete CDRs', global=>1 }, #], # ### @@ -249,6 +273,10 @@ tie my %rights, 'Tie::IxHash', { rightname=>'Broadband global configuration', global=>1 }, { rightname=>'Configuration', global=>1 }, #most of the rest of the configuraiton is not agent-virtualized + + { rightname=>'Configuration download', }, #description of how it affects + #search/elements/search.html + ], ; @@ -259,14 +287,38 @@ tie my %rights, 'Tie::IxHash', =item rights -Returns a list of right names. +Returns the full list of right names. =cut - sub rights { +sub rights { #my $class = shift; map { ref($_) ? $_->{'rightname'} : $_ } map @{ $rights{$_} }, keys %rights; - } +} + +=item default_superuser_rights + +Most (but not all) right names. + +=cut + +sub default_superuser_rights { + my $class = shift; + my %omit = map { $_=>1 } ( + 'Delete customer', + 'Delete invoices', + 'Delete payment', + 'Delete credit', #? + 'Delete refund', #? + 'Time queue', + 'Redownload resolved batches', + 'Raw SQL', + 'Configuration download', + ); + + no warnings 'uninitialized'; + grep { ! $omit{$_} } $class->rights; +} =item rights_info