add back invoice event reports
[freeside.git] / FS / FS / AccessRight.pm
1 package FS::AccessRight;
2
3 use strict;
4 use vars qw(@rights); # %rights);
5 use Tie::IxHash;
6
7 =head1 NAME
8
9 FS::AccessRight - Access control rights.
10
11 =head1 SYNOPSIS
12
13   use FS::AccessRight;
14
15 =head1 DESCRIPTION
16
17 Access control rights - Permission to perform specific actions that can be
18 assigned to users and/or groups.
19
20 =cut
21
22 #@rights = (
23 #  'Reports' => [
24 #    '_desc' => 'Access to high-level reporting',
25 #  ],
26 #  'Configuration' => [
27 #    '_desc' => 'Access to configuration',
28 #
29 #    'Settings' => {},
30 #
31 #    'agent' => [
32 #      '_desc' => 'Master access to reseller configuration',
33 #      'agent_type'  => {},
34 #      'agent'       => {},
35 #    ],
36 #
37 #    'export_svc_pkg' => [
38 #      '_desc' => 'Access to export, service and package configuration',
39 #      'part_export' => {},
40 #      'part_svc'    => {},
41 #      'part_pkg'    => {},
42 #      'pkg_class'   => {},
43 #    ],
44 #
45 #    'billing' => [
46 #      '_desc' => 'Access to billing configuration',
47 #      'payment_gateway'  => {},
48 #      'part_bill_event'  => {},
49 #      'prepay_credit'    => {},
50 #      'rate'             => {},
51 #      'cust_main_county' => {},
52 #    ],
53 #
54 #    'dialup' => [
55 #      '_desc' => 'Access to dialup configuraiton',
56 #      'svc_acct_pop' => {},
57 #    ],
58 #
59 #    'broadband' => [
60 #      '_desc' => 'Access to broadband configuration',
61 #      'router'     => {},
62 #      'addr_block' => {},
63 #    ],
64 #
65 #    'misc' => [
66 #      'part_referral'      => {},
67 #      'part_virtual_field' => {},
68 #      'msgcat'             => {},
69 #      'inventory_class'    => {},
70 #    ],
71 #
72 #  },
73 #
74 #);
75 #
76 ##turn it into a more hash-like structure, but ordered via IxHash
77
78 #well, this is what we have for now.  could be ordered better, could be lots of
79 # things better, but this ACL system does 99% of what folks need and the UI
80 # isn't *that* bad
81 @rights = (
82   'New customer',
83   'View customer',
84   #'View Customer | View tickets',
85   'Edit customer',
86   'Cancel customer',
87   'Complimentary customer', #aka users-allow_comp 
88   '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.
89
90   'Order customer package',
91   'One-time charge',
92   'Change customer package',
93   'Bulk change customer packages',
94   'Edit customer package dates',
95   'Customize customer package',
96   'Suspend customer package',
97   'Unsuspend customer package',
98   'Cancel customer package immediately',
99   'Cancel customer package later',
100
101   'Provision customer service',
102   'Unprovision customer service',
103
104   'View/link unlinked services', #not agent-virtualizable without more work
105
106   'View invoices',
107
108   'Post payment',
109   'Post payment batch',
110   'Unapply payment', #aka. unapplypayments Enable "unapplication" of unclosed payments.
111   'Process payment',
112   'Refund payment',
113
114   '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.
115
116   'Post credit',
117   #'Apply credit',
118   'Unapply credit', #aka unapplycredits Enable "unapplication" of unclosed credits.
119   '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.
120
121   'Credit card void', #aka. cc-void #Enable local-only voiding of echeck payments in addition to refunds against the payment gateway
122   'Echeck void', #aka. echeck-void #Enable local-only voiding of echeck payments in addition to refunds against the payment gateway
123   'Regular void',
124   'Unvoid', #aka. unvoid #Enable unvoiding of voided payments
125
126   'List customers',
127   #'List zip codes',
128   'List invoices',
129   'List packages',
130   'List services',
131
132   'List rating data',
133   'Billing event reports',
134   'Financial reports',
135
136   'Job queue', # these are not currently agent-virtualized
137   'Import',    #
138   'Export',    #
139
140   'Edit advertising sources',
141   'Edit global advertising sources',
142
143   'Configuration', #most of the rest of the configuraiton is not
144                    # agent-virtualized
145 );
146
147 sub rights {
148   @rights;
149 }
150