]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/ACLActions/actiondefs.php
Release 6.5.0
[Github/sugarcrm.git] / modules / ACLActions / actiondefs.php
1 <?php
2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
6  * 
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Affero General Public License version 3 as published by the
9  * Free Software Foundation with the addition of the following permission added
10  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13  * 
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
17  * details.
18  * 
19  * You should have received a copy of the GNU Affero General Public License along with
20  * this program; if not, see http://www.gnu.org/licenses or write to the Free
21  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22  * 02110-1301 USA.
23  * 
24  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26  * 
27  * The interactive user interfaces in modified source and object code versions
28  * of this program must display Appropriate Legal Notices, as required under
29  * Section 5 of the GNU Affero General Public License version 3.
30  * 
31  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32  * these Appropriate Legal Notices must retain the display of the "Powered by
33  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34  * technical reasons, the Appropriate Legal Notices must display the words
35  * "Powered by SugarCRM".
36  ********************************************************************************/
37
38  if(!defined('ACL_ALLOW_NONE')){   
39         define('ACL_ALLOW_ADMIN_DEV', 100);
40         define('ACL_ALLOW_ADMIN', 99);
41         define('ACL_ALLOW_ALL', 90);                        
42         define('ACL_ALLOW_ENABLED', 89);
43         define('ACL_ALLOW_OWNER', 75);
44         define('ACL_ALLOW_NORMAL', 1);
45         define('ACL_ALLOW_DEFAULT', 0);
46         define('ACL_ALLOW_DISABLED', -98);
47         define('ACL_ALLOW_NONE', -99);
48         define('ACL_ALLOW_DEV', 95);
49  }
50  /**
51   * $GLOBALS['ACLActionAccessLevels
52   * these are rendering descriptions for Access Levels giving information such as the label, color, and text color to use when rendering the access level
53   */
54  $GLOBALS['ACLActionAccessLevels'] = array(
55         ACL_ALLOW_ALL=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_ALL', 'text_color'=>'white'),
56         ACL_ALLOW_OWNER=>array('color'=>'#6F6800', 'label'=>'LBL_ACCESS_OWNER', 'text_color'=>'white'),
57         ACL_ALLOW_NONE=>array('color'=>'#FF0000', 'label'=>'LBL_ACCESS_NONE', 'text_color'=>'white'),
58         ACL_ALLOW_ENABLED=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_ENABLED', 'text_color'=>'white'),
59         ACL_ALLOW_DISABLED=>array('color'=>'#FF0000', 'label'=>'LBL_ACCESS_DISABLED', 'text_color'=>'white'),
60         ACL_ALLOW_ADMIN=>array('color'=>'#0000FF', 'label'=>'LBL_ACCESS_ADMIN', 'text_color'=>'white'),
61         ACL_ALLOW_NORMAL=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_NORMAL', 'text_color'=>'white'),
62         ACL_ALLOW_DEFAULT=>array('color'=>'#008000', 'label'=>'LBL_ACCESS_DEFAULT', 'text_color'=>'white'),
63         ACL_ALLOW_DEV=>array('color'=>'#0000FF', 'label'=>'LBL_ACCESS_DEV', 'text_color'=>'white'),
64         ACL_ALLOW_ADMIN_DEV=>array('color'=>'#0000FF', 'label'=>'LBL_ACCESS_ADMIN_DEV', 'text_color'=>'white'),
65         );
66 /**
67  * $GLOBALS['ACLActions
68  * These are the actions for a given type. It includes the ACCESS Levels for that action and the label for that action. Every an object of the category (e.g. module) is added all associated actions are added for that object
69  */
70 $GLOBALS['ACLActions'] = array(
71         'module'=>array('actions'=>
72                                                 array(
73                                                 'access'=>
74                                                                 array(
75                                                                         'aclaccess'=>array(ACL_ALLOW_ENABLED,ACL_ALLOW_DEFAULT, ACL_ALLOW_DISABLED),
76                                                                         'label'=>'LBL_ACTION_ACCESS',
77                                                                         'default'=>ACL_ALLOW_ENABLED,
78                                                                 ),
79                                                         
80                                                 'view'=>
81                                                                 array(
82                                                                         'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
83                                                                         'label'=>'LBL_ACTION_VIEW',
84                                                                         'default'=>ACL_ALLOW_ALL,
85                                                                 ),
86                                         
87                                                 'list'=>
88                                                                 array(
89                                                                         'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
90                                                                         'label'=>'LBL_ACTION_LIST',
91                                                                         'default'=>ACL_ALLOW_ALL,
92                                                                 ),
93                                                 'edit'=>
94                                                                 array(
95                                                                         'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
96                                                                         'label'=>'LBL_ACTION_EDIT',
97                                                                         'default'=>ACL_ALLOW_ALL,
98                                                                         
99                                                                 ),
100                                                 'delete'=>
101                                                         array(
102                                                                         'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
103                                                                         'label'=>'LBL_ACTION_DELETE',
104                                                                         'default'=>ACL_ALLOW_ALL,
105                                                                         
106                                                                 ),
107                                                 'import'=>
108                                                         array(
109                                                                         'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
110                                                                         'label'=>'LBL_ACTION_IMPORT',
111                                                                         'default'=>ACL_ALLOW_ALL,
112                                                                 ),
113                                                 'export'=>
114                                                         array(
115                                                                         'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_OWNER,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
116                                                                         'label'=>'LBL_ACTION_EXPORT',
117                                                                         'default'=>ACL_ALLOW_ALL,
118                                                                 ),
119                         'massupdate'=>
120                                                         array(
121                                                                         'aclaccess'=>array(ACL_ALLOW_ALL,ACL_ALLOW_DEFAULT, ACL_ALLOW_NONE),
122                                                                         'label'=>'LBL_ACTION_MASSUPDATE',
123                                                                         'default'=>ACL_ALLOW_ALL,
124                                                                 ),
125                                                 
126                                         
127                                 ),),
128 );
129
130
131 ?>