/
ucberkeley_cas.features.defaultconfig.inc
377 lines (338 loc) · 13.3 KB
/
ucberkeley_cas.features.defaultconfig.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<?php
/**
* @file
* ucberkeley_cas.features.defaultconfig.inc
*/
/**
* Implements hook_defaultconfig_features().
*/
function ucberkeley_cas_defaultconfig_features() {
return array(
'ucberkeley_cas' => array(
'default_ldap_servers' => 'default_ldap_servers',
'field_default_fields' => 'field_default_fields',
'strongarm' => 'strongarm',
),
);
}
/**
* Implements hook_defaultconfig_default_ldap_servers().
*/
function ucberkeley_cas_defaultconfig_default_ldap_servers() {
$export = array();
$ldap_servers_conf = new stdClass();
$ldap_servers_conf->disabled = FALSE; /* Edit this to true to make a default ldap_servers_conf disabled initially */
$ldap_servers_conf->api_version = 1;
$ldap_servers_conf->sid = 'ucb_prod';
$ldap_servers_conf->name = 'ldap.berkeley.edu';
$ldap_servers_conf->status = TRUE;
$ldap_servers_conf->ldap_type = 'default';
$ldap_servers_conf->address = 'ldap.berkeley.edu';
$ldap_servers_conf->port = 389;
$ldap_servers_conf->tls = TRUE;
$ldap_servers_conf->followrefs = FALSE;
$ldap_servers_conf->bind_method = 3;
$ldap_servers_conf->binddn = '';
$ldap_servers_conf->bindpw = '';
$ldap_servers_conf->basedn = array(
0 => 'ou=people,dc=berkeley,dc=edu',
);
$ldap_servers_conf->user_attr = 'uid';
$ldap_servers_conf->account_name_attr = '';
$ldap_servers_conf->mail_attr = 'mail';
$ldap_servers_conf->mail_template = '';
$ldap_servers_conf->picture_attr = '';
$ldap_servers_conf->unique_persistent_attr = '';
$ldap_servers_conf->unique_persistent_attr_binary = FALSE;
$ldap_servers_conf->user_dn_expression = '';
$ldap_servers_conf->ldap_to_drupal_user = '';
$ldap_servers_conf->testing_drupal_username = '213108';
$ldap_servers_conf->testing_drupal_user_dn = '';
$ldap_servers_conf->grp_unused = FALSE;
$ldap_servers_conf->grp_object_cat = '';
$ldap_servers_conf->grp_nested = FALSE;
$ldap_servers_conf->grp_user_memb_attr_exists = FALSE;
$ldap_servers_conf->grp_user_memb_attr = '';
$ldap_servers_conf->grp_memb_attr = '';
$ldap_servers_conf->grp_memb_attr_match_user_attr = '';
$ldap_servers_conf->grp_derive_from_dn = FALSE;
$ldap_servers_conf->grp_derive_from_dn_attr = '';
$ldap_servers_conf->grp_test_grp_dn = '';
$ldap_servers_conf->grp_test_grp_dn_writeable = '';
$ldap_servers_conf->search_pagination = FALSE;
$ldap_servers_conf->search_page_size = 1000;
$ldap_servers_conf->weight = 0;
$export['ucb_prod'] = $ldap_servers_conf;
return $export;
}
/**
* Implements hook_defaultconfig_field_default_fields().
*/
function ucberkeley_cas_defaultconfig_field_default_fields() {
$fields = array();
// Exported field: 'user-user-field_display_name'.
$fields['user-user-field_display_name'] = array(
'field_config' => array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_display_name',
'foreign keys' => array(
'format' => array(
'columns' => array(
'format' => 'format',
),
'table' => 'filter_format',
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'locked' => 0,
'module' => 'text',
'settings' => array(
'max_length' => 255,
),
'translatable' => 0,
'type' => 'text',
),
'field_instance' => array(
'bundle' => 'user',
'default_value' => NULL,
'deleted' => 0,
'description' => 'Display names should be updated in the system of record (UC Path for faculty and staff; Student Information Systems for students). See our <a href="https://open.berkeley.edu/guides/site-builders-guide/manage-users">Manage Users documentation</a> for more information.',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => -10,
),
'featured' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'user',
'field_name' => 'field_display_name',
'label' => 'Display name',
'required' => 0,
'settings' => array(
'linkit' => array(
'button_text' => 'Search',
'enable' => 0,
'profile' => '',
),
'text_processing' => 0,
'user_register_form' => 0,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'maxlength_js' => 0,
'maxlength_js_label' => 'Content limited to @limit characters, remaining: <strong>@remaining</strong>',
'size' => 60,
),
'type' => 'text_textfield',
'weight' => 0,
),
),
);
// Translatables
// Included for use with string extractors like potx.
t('Display name');
return $fields;
}
/**
* Implements hook_defaultconfig_strongarm().
*/
function ucberkeley_cas_defaultconfig_strongarm() {
$export = array();
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_access';
$strongarm->value = '0';
$export['cas_access'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_attributes_sync_every_login';
$strongarm->value = '0';
$export['cas_attributes_sync_every_login'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_auto_assigned_role';
$rid_auth_user = array_search('authenticated user', user_roles());
$strongarm->value = array(
$rid_auth_user => TRUE,
);
$export['cas_auto_assigned_role'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_cert';
if (array_key_exists('PANTHEON_ENVIRONMENT', $_ENV)) {
// Pantheon's certificate authority bundle will be at this path in all environments.
$strongarm->value = '/etc/ssl/certs/ca-bundle.crt';
}
else {
// If Pantheon is not the host, hopefully the user will set the value manually.
$strongarm->value = '';
}
$export['cas_cert'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_changePasswordURL';
$strongarm->value = '';
$export['cas_changePasswordURL'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_debugfile';
$strongarm->value = '';
$export['cas_debugfile'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_domain';
$strongarm->value = '';
$export['cas_domain'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_exclude';
$strongarm->value = '';
$export['cas_exclude'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_first_login_destination';
$strongarm->value = '';
$export['cas_first_login_destination'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_hide_email';
$strongarm->value = 0;
$export['cas_hide_email'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_hide_password';
$strongarm->value = 1;
$export['cas_hide_password'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_library_dir';
$strongarm->value = 'composer/vendor/apereo/phpcas/source';
$export['cas_library_dir'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_library_use_libraries';
$strongarm->value = '0';
$export['cas_library_use_libraries'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_login_drupal_invite';
$strongarm->value = '';
$export['cas_login_drupal_invite'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_login_form';
$strongarm->value = '2';
$export['cas_login_form'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_login_invite';
$strongarm->value = 'Log in using CalNet';
$export['cas_login_invite'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_login_message';
$strongarm->value = 'Logged in via CalNet as %cas_username.';
$export['cas_login_message'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_login_redir_message';
$strongarm->value = 'You will be redirected to the secure CalNet login page.';
$export['cas_login_redir_message'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_logout_destination';
$strongarm->value = '<front>';
$export['cas_logout_destination'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_pages';
$strongarm->value = 'node/add/*
node/*/edit/*';
$export['cas_pages'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_pgtformat';
$strongarm->value = 'plain';
$export['cas_pgtformat'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_pgtpath';
$strongarm->value = '';
$export['cas_pgtpath'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_proxy';
$strongarm->value = 0;
$export['cas_proxy'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_registerURL';
$strongarm->value = '';
$export['cas_registerURL'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_server';
$strongarm->value = 'auth-test.berkeley.edu';
$export['cas_server'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_uri';
$strongarm->value = '/cas';
$export['cas_uri'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'cas_user_register';
$strongarm->value = 1;
$export['cas_user_register'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'user_mail_status_activated_notify';
$strongarm->value = 0;
$export['user_mail_status_activated_notify'] = $strongarm;
return $export;
}