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-2013 SugarCRM Inc.
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.
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
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
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.
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.
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 ********************************************************************************/
38 $dictionary['OAuthToken'] = array('table' => 'oauth_tokens',
39 'comment' => 'OAuth tokens',
49 'comment' => 'Unique identifier'
57 'comment' => 'Secret key',
64 'options' => 'token_status',
66 'comment' => 'Token state',
74 'comment' => 'Token related to the consumer',
81 'comment' => 'Token timestamp',
82 'function' => array('name' => 'displayDateFromTs', 'returns' => 'html', 'onListView' => true)
89 'comment' => 'Token verification info',
93 // 'name' => 'verify',
95 // 'comment' => 'Token auth data',
100 'vname' => 'LBL_DELETED',
106 'comment' => 'Record deletion indicator'
110 'name' => 'callback_url',
114 'comment' => 'Callback URL for Authorization',
118 'name' => 'consumer_link',
120 'relationship' => 'consumer_tokens',
121 'vname' => 'LBL_CONSUMER',
122 'link_type' => 'one',
123 'module'=>'OAuthKeys',
124 'bean_name'=>'OAuthKey',
129 'name' => 'consumer_name',
130 'link'=>'consumer_link' ,
131 'vname' => 'LBL_CONSUMER',
136 'table' => 'oauth_consumer',
137 'id_name' => 'consumer',
138 'module'=>'OAuthKeys',
139 'duplicate_merge'=>'disabled'
141 'assigned_user_id' =>
143 'name' => 'assigned_user_id',
144 'rname' => 'user_name',
145 'id_name' => 'assigned_user_id',
146 'vname' => 'LBL_ASSIGNED_TO_ID',
147 'group'=>'assigned_user_name',
155 'comment' => 'User ID assigned to record',
156 'duplicate_merge'=>'disabled'
158 'assigned_user_name' =>
160 'name' => 'assigned_user_name',
161 'link'=>'assigned_user_link' ,
162 'vname' => 'LBL_ASSIGNED_TO_NAME',
163 'rname' => 'user_name',
168 'id_name' => 'assigned_user_id',
170 'duplicate_merge'=>'disabled'
172 'assigned_user_link' =>
174 'name' => 'assigned_user_link',
176 'relationship' => 'oauthtokens_assigned_user',
177 'vname' => 'LBL_ASSIGNED_TO_USER',
178 'link_type' => 'one',
182 'duplicate_merge'=>'enabled',
183 'rname' => 'user_name',
184 'id_name' => 'assigned_user_id',
189 'id'=>array('name' =>'oauthtokenpk', 'type' =>'primary', 'fields'=>array('id', 'deleted')),
190 'state_ts'=>array('name' =>"oauth_state_ts", 'type' =>'index', 'fields'=>array('tstate','token_ts')),
191 'consumer'=>array('name' =>"constoken_key", 'type' =>'index', 'fields'=>array('consumer')),
193 'relationships'=>array(
195 array('lhs_module'=> 'OAuthKeys', 'lhs_table'=> 'oauth_consumer', 'lhs_key' => 'id',
196 'rhs_module'=> 'OAuthTokens', 'rhs_table'=> 'oauth_tokens', 'rhs_key' => 'consumer',
197 'relationship_type'=>'one-to-many'),
198 'oauthtokens_assigned_user' =>
199 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
200 'rhs_module'=> 'OAuthTokens' , 'rhs_table'=> 'oauth_tokens', 'rhs_key' => 'assigned_user_id',
201 'relationship_type'=>'one-to-many')