X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FAccessRight.pm;h=f04779a07a37762a59a804796d7ec31652880e58;hb=9608be1f5c73517fc348f1ab458892b34ed7facb;hp=01d63e35db7a926c146f3c43737068065afe72e3;hpb=2c757d7db4cb6a7b9655de13206fcc84fb7ce61f;p=freeside.git diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index 01d63e35d..f04779a07 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -1,7 +1,7 @@ package FS::AccessRight; use strict; -user vars qw(@rights %rights); +use vars qw(@rights); # %rights); use Tie::IxHash; =head1 NAME @@ -19,59 +19,126 @@ assigned to users and/or groups. =cut +#@rights = ( +# 'Reports' => [ +# '_desc' => 'Access to high-level reporting', +# ], +# 'Configuration' => [ +# '_desc' => 'Access to configuration', +# +# 'Settings' => {}, +# +# 'agent' => [ +# '_desc' => 'Master access to reseller configuration', +# 'agent_type' => {}, +# 'agent' => {}, +# ], +# +# 'export_svc_pkg' => [ +# '_desc' => 'Access to export, service and package configuration', +# 'part_export' => {}, +# 'part_svc' => {}, +# 'part_pkg' => {}, +# 'pkg_class' => {}, +# ], +# +# 'billing' => [ +# '_desc' => 'Access to billing configuration', +# 'payment_gateway' => {}, +# 'part_bill_event' => {}, +# 'prepay_credit' => {}, +# 'rate' => {}, +# 'cust_main_county' => {}, +# ], +# +# 'dialup' => [ +# '_desc' => 'Access to dialup configuraiton', +# 'svc_acct_pop' => {}, +# ], +# +# 'broadband' => [ +# '_desc' => 'Access to broadband configuration', +# 'router' => {}, +# 'addr_block' => {}, +# ], +# +# 'misc' => [ +# 'part_referral' => {}, +# 'part_virtual_field' => {}, +# 'msgcat' => {}, +# 'inventory_class' => {}, +# ], +# +# }, +# +#); +# +##turn it into a more hash-like structure, but ordered via IxHash + +#well, this is what we have for now. could be ordered better, could be lots of +# things better, but this ACL system does 99% of what folks need and the UI +# isn't *that* bad @rights = ( - 'Reports' => [ - '_desc' => 'Access to high-level reporting', - ], - 'Configuration' => [ - '_desc' => 'Access to configuration', - - 'Settings' => {}, - - 'agent' => [ - '_desc' => 'Master access to reseller configuration', - 'agent_type' => {}, - 'agent' => {}, - ], - - 'export_svc_pkg' => [ - '_desc' => 'Access to export, service and package configuration', - 'part_export' => {}, - 'part_svc' => {}, - 'part_pkg' => {}, - 'pkg_class' => {}, - ], - - 'billing' => [ - '_desc' => 'Access to billing configuration', - 'payment_gateway' => {}, - 'part_bill_event' => {}, - 'prepay_credit' => {}, - 'rate' => {}, - 'cust_main_county' => {}, - ], - - 'dialup' => [ - '_desc' => 'Access to dialup configuraiton', - 'svc_acct_pop' => {}, - ], - - 'broadband' => [ - '_desc' => 'Access to broadband configuration', - 'router' => {}, - 'addr_block' => {}, - ], - - 'misc' => [ - 'part_referral' => {}, - 'part_virtual_field' => {}, - 'msgcat' => {}, - 'inventory_class' => {}, - ], - - }, + 'New customer', + 'View customer', + #'View Customer | View tickets', + 'Edit customer', + 'Cancel customer', + 'Complimentary customer', #aka users-allow_comp + 'Delete customer', #aka. deletecustomers #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 customers' packages if they cancel service. + + 'Order customer package', + 'One-time charge', + 'Change customer package', + 'Bulk change customer packages', + 'Edit customer package dates', + 'Customize customer package', + 'Suspend customer package', + 'Unsuspend customer package', + 'Cancel customer package immediately', + 'Cancel customer package later', + + 'Provision customer service', + 'Unprovision customer service', + + 'View/link unlinked services', #not agent-virtualizable without more work + + 'View invoices', + + 'Post payment', + 'Post payment batch', + 'Unapply payment', #aka. unapplypayments Enable "unapplication" of unclosed payments. + 'Process payment', + 'Refund payment', + + 'Delete payment', #aka. deletepayments - Enable deletion of unclosed payments. Be very careful! Only delete payments that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted. + + 'Post credit', + #'Apply credit', + 'Unapply credit', #aka unapplycredits Enable "unapplication" of unclosed credits. + 'Delete credit', #aka. deletecredits Enable deletion of unclosed credits. Be very careful! Only delete credits that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a credit is deleted. + + 'Credit card void', #aka. cc-void #Enable local-only voiding of echeck payments in addition to refunds against the payment gateway + 'Echeck void', #aka. echeck-void #Enable local-only voiding of echeck payments in addition to refunds against the payment gateway + 'Unvoid', #aka. unvoid #Enable unvoiding of voided payments + + 'List customers', + #'List zip codes', + 'List invoices', + 'List packages', + 'List services', + + 'Financial reports', + + 'Job queue', # these are not currently agent-virtualized + 'Import', # + 'Export', # + + 'Configuration', #none of the configuraiton is agent-virtualized either ); -#turn it into a more hash-like structure, but ordered via IxHash +sub rights { + @rights; +}