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.
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' => 'consumer_link',
112 'relationship' => 'consumer_tokens',
113 'vname' => 'LBL_CONSUMER',
114 'link_type' => 'one',
115 'module'=>'OAuthKeys',
116 'bean_name'=>'OAuthKey',
121 'name' => 'consumer_name',
122 'link'=>'consumer_link' ,
123 'vname' => 'LBL_CONSUMER',
128 'table' => 'oauth_consumer',
129 'id_name' => 'consumer',
130 'module'=>'OAuthKeys',
131 'duplicate_merge'=>'disabled'
133 'assigned_user_id' =>
135 'name' => 'assigned_user_id',
136 'rname' => 'user_name',
137 'id_name' => 'assigned_user_id',
138 'vname' => 'LBL_ASSIGNED_TO_ID',
139 'group'=>'assigned_user_name',
147 'comment' => 'User ID assigned to record',
148 'duplicate_merge'=>'disabled'
150 'assigned_user_name' =>
152 'name' => 'assigned_user_name',
153 'link'=>'assigned_user_link' ,
154 'vname' => 'LBL_ASSIGNED_TO_NAME',
155 'rname' => 'user_name',
160 'id_name' => 'assigned_user_id',
162 'duplicate_merge'=>'disabled'
164 'assigned_user_link' =>
166 'name' => 'assigned_user_link',
168 'relationship' => 'oauthtokens_assigned_user',
169 'vname' => 'LBL_ASSIGNED_TO_USER',
170 'link_type' => 'one',
174 'duplicate_merge'=>'enabled',
175 'rname' => 'user_name',
176 'id_name' => 'assigned_user_id',
181 'id'=>array('name' =>'oauthtokenpk', 'type' =>'primary', 'fields'=>array('id', 'deleted')),
182 'state_ts'=>array('name' =>"oauth_state_ts", 'type' =>'index', 'fields'=>array('tstate','token_ts')),
183 'consumer'=>array('name' =>"constoken_key", 'type' =>'index', 'fields'=>array('consumer')),
185 'relationships'=>array(
187 array('lhs_module'=> 'OAuthKeys', 'lhs_table'=> 'oauth_consumer', 'lhs_key' => 'id',
188 'rhs_module'=> 'OAuthTokens', 'rhs_table'=> 'oauth_tokens', 'rhs_key' => 'consumer',
189 'relationship_type'=>'one-to-many'),
190 'oauthtokens_assigned_user' =>
191 array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
192 'rhs_module'=> 'OAuthTokens' , 'rhs_table'=> 'oauth_tokens', 'rhs_key' => 'assigned_user_id',
193 'relationship_type'=>'one-to-many')