Révision bc175c27
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/ldap/ldap_authorization/ldap_authorization.install | ||
---|---|---|
11 | 11 |
function ldap_authorization_requirements($phase) { |
12 | 12 |
$requirements = array(); |
13 | 13 |
|
14 |
if ($phase != "install" && db_field_exists('ldapauth', 'ldapgroups_in_dn' )) {
|
|
14 |
if ($phase != "install" && db_field_exists('ldapauth', 'ldapgroups_in_dn')) {
|
|
15 | 15 |
$requirements['ldap_authorization_ldap_integration']['title'] = t('LDAP Integration LDAP Groups Upgrade Concern'); |
16 | 16 |
$requirements['ldap_authorization_ldap_integration']['severity'] = REQUIREMENT_WARNING; |
17 | 17 |
$requirements['ldap_authorization_ldap_integration']['value'] = NULL; |
... | ... | |
21 | 21 |
See also. See http://drupal.org/node/1023016, http://drupal.org/node/1183192. |
22 | 22 |
This message will go away when the ldapauth database table is removed.'); |
23 | 23 |
} |
24 |
// check that ldapauth not installed.
|
|
24 |
// Check that ldapauth not installed.
|
|
25 | 25 |
return $requirements; |
26 | 26 |
} |
27 | 27 |
|
... | ... | |
41 | 41 |
|
42 | 42 |
} |
43 | 43 |
|
44 |
|
|
45 |
|
|
46 | 44 |
/** |
47 | 45 |
* Implements hook_uninstall(). |
48 | 46 |
*/ |
... | ... | |
62 | 60 |
module_load_include('inc', 'ldap_servers', 'ldap_servers.user_data_remove'); |
63 | 61 |
batch_set(ldap_severs_user_data_setup_batch()); |
64 | 62 |
$batch =& batch_get(); |
65 |
|
|
66 |
} |
|
67 | 63 |
|
64 |
} |
|
68 | 65 |
|
66 |
/** |
|
67 |
* |
|
68 |
*/ |
|
69 | 69 |
function ldap_authorization_user_entity_fields() { |
70 | 70 |
|
71 | 71 |
$fields = array(); |
... | ... | |
73 | 73 |
return $fields; |
74 | 74 |
} |
75 | 75 |
|
76 |
|
|
77 | 76 |
/** |
78 | 77 |
* Implements hook_schema(). |
79 | 78 |
*/ |
... | ... | |
117 | 116 |
} |
118 | 117 |
|
119 | 118 |
/** |
120 |
* add 'create_consumers field to ldap_authorization table
|
|
119 |
* Add 'create_consumers field to ldap_authorization table.
|
|
121 | 120 |
*/ |
122 | 121 |
function ldap_authorization_update_7100() { |
123 | 122 |
|
... | ... | |
137 | 136 |
} |
138 | 137 |
|
139 | 138 |
/** |
140 |
* add derive_from_attr_use_first_attr field to ldap_authorization table
|
|
139 |
* Add derive_from_attr_use_first_attr field to ldap_authorization table.
|
|
141 | 140 |
*/ |
142 | 141 |
function ldap_authorization_update_7101() { |
143 | 142 |
|
... | ... | |
156 | 155 |
|
157 | 156 |
} |
158 | 157 |
|
159 |
|
|
160 | 158 |
/** |
161 |
* Add derive_from_entry_search_all column to ldap_authorization |
|
159 |
* Add derive_from_entry_search_all column to ldap_authorization.
|
|
162 | 160 |
*/ |
163 | 161 |
function ldap_authorization_update_7102() { |
164 | 162 |
|
... | ... | |
178 | 176 |
} |
179 | 177 |
|
180 | 178 |
/** |
181 |
* change derive_from_attr_attr and derive_from_entry fields to text instead of varchar 2555
|
|
179 |
* Change derive_from_attr_attr and derive_from_entry fields to text instead of varchar 2555.
|
|
182 | 180 |
*/ |
183 | 181 |
function ldap_authorization_update_7103() { |
184 | 182 |
|
185 | 183 |
foreach (array('derive_from_dn_attr', 'derive_from_attr_attr', 'derive_from_entry_entries') as $field_name) { |
186 | 184 |
db_change_field('ldap_authorization', $field_name, $field_name, array( |
187 |
'type' => 'text', |
|
188 |
'not null' => FALSE, |
|
185 |
'type' => 'text',
|
|
186 |
'not null' => FALSE,
|
|
189 | 187 |
)); |
190 | 188 |
} |
191 | 189 |
|
192 | 190 |
} |
193 | 191 |
|
194 | 192 |
/** |
195 |
* change derive_from_attr_attr and derive_from_entry fields to text instead of varchar 2555
|
|
193 |
* Change derive_from_attr_attr and derive_from_entry fields to text instead of varchar 2555
|
|
196 | 194 |
* applied second time because beta6 and 7 were wrong. |
197 | 195 |
*/ |
198 | 196 |
function ldap_authorization_update_7104() { |
199 | 197 |
|
200 | 198 |
foreach (array('derive_from_dn_attr', 'derive_from_attr_attr', 'derive_from_entry_entries') as $field_name) { |
201 | 199 |
db_change_field('ldap_authorization', $field_name, $field_name, array( |
202 |
'type' => 'text', |
|
203 |
'not null' => FALSE, |
|
200 |
'type' => 'text',
|
|
201 |
'not null' => FALSE,
|
|
204 | 202 |
)); |
205 | 203 |
} |
206 | 204 |
|
207 | 205 |
} |
208 | 206 |
|
209 | 207 |
/** |
210 |
* add derive_from_entry_user_ldap_attr field to allow user specification of dn or other identifier.
|
|
208 |
* Add derive_from_entry_user_ldap_attr field to allow user specification of dn or other identifier.
|
|
211 | 209 |
*/ |
212 | 210 |
function ldap_authorization_update_7105() { |
213 | 211 |
|
... | ... | |
226 | 224 |
} |
227 | 225 |
|
228 | 226 |
/** |
229 |
* add nested checkboxes to derive from entry and attributes strategies.
|
|
227 |
* Add nested checkboxes to derive from entry and attributes strategies.
|
|
230 | 228 |
*/ |
231 | 229 |
function ldap_authorization_update_7106() { |
232 | 230 |
|
... | ... | |
247 | 245 |
'not null' => TRUE, |
248 | 246 |
'default' => 0, |
249 | 247 |
)); |
250 |
$msg .= t('"derive_from_entry_nested" field added to ldap_authorization table');
|
|
248 |
$msg .= t('"derive_from_entry_nested" field added to ldap_authorization table'); |
|
251 | 249 |
} |
252 | 250 |
|
253 |
return ($msg) ? $msg : t('No database changes made.');
|
|
251 |
return ($msg) ? $msg : t('No database changes made.'); |
|
254 | 252 |
} |
255 | 253 |
|
256 | 254 |
/** |
257 |
* add derive_from_entry_use_first_attr field to and remove description field from ldap_authorization table
|
|
255 |
* Add derive_from_entry_use_first_attr field to and remove description field from ldap_authorization table.
|
|
258 | 256 |
*/ |
259 | 257 |
function ldap_authorization_update_7107() { |
260 | 258 |
|
... | ... | |
272 | 270 |
|
273 | 271 |
if (db_field_exists('ldap_authorization', 'description')) { |
274 | 272 |
db_drop_field('ldap_authorization', 'description'); |
275 |
$changes .= t('"description" field dropped from to ldap_authorization table');
|
|
273 |
$changes .= t('"description" field dropped from to ldap_authorization table'); |
|
276 | 274 |
} |
277 | 275 |
|
278 | 276 |
return ($changes) ? $changes : t('No database changes made.'); |
279 | 277 |
|
280 | 278 |
} |
281 | 279 |
|
282 |
|
|
283 | 280 |
/** |
284 |
* add derive_from_entry_entries_attr field to allow user specification of attribute representing group in queries.
|
|
281 |
* Add derive_from_entry_entries_attr field to allow user specification of attribute representing group in queries.
|
|
285 | 282 |
*/ |
286 | 283 |
function ldap_authorization_update_7108() { |
287 | 284 |
|
... | ... | |
301 | 298 |
} |
302 | 299 |
|
303 | 300 |
/** |
304 |
* moving some groups related fields into ldap server module
|
|
301 |
* Moving some groups related fields into ldap server module.
|
|
305 | 302 |
*/ |
306 | 303 |
function ldap_authorization_update_7201() { |
307 | 304 |
|
308 |
// need to merge 2 table fields (derive_from_entry_use_first_attr and derive_from_attr_use_first_attr into one field useFirstAttrAsGroupId)
|
|
305 |
// Need to merge 2 table fields (derive_from_entry_use_first_attr and derive_from_attr_use_first_attr into one field useFirstAttrAsGroupId)
|
|
309 | 306 |
$results = ''; |
310 | 307 |
|
311 | 308 |
if (!db_field_exists('ldap_authorization', 'useFirstAttrAsGroupId')) { |
... | ... | |
329 | 326 |
} |
330 | 327 |
} |
331 | 328 |
|
332 |
|
|
333 | 329 |
/** |
334 |
* remove user ldap authorizations field. its in $user->data now
|
|
330 |
* Remove user ldap authorizations field. its in $user->data now.
|
|
335 | 331 |
*/ |
336 | 332 |
function ldap_authorization_update_7202() { |
337 | 333 |
|
338 |
$instance = array(
|
|
339 |
'field_name' => 'ldap_authorizations',
|
|
340 |
'entity_type' => 'user',
|
|
341 |
'bundle' => 'user',
|
|
342 |
);
|
|
343 |
field_delete_instance($instance, TRUE);
|
|
344 |
field_delete_field('ldap_authorizations');
|
|
334 |
$instance = array( |
|
335 |
'field_name' => 'ldap_authorizations', |
|
336 |
'entity_type' => 'user', |
|
337 |
'bundle' => 'user', |
|
338 |
); |
|
339 |
field_delete_instance($instance, TRUE); |
|
340 |
field_delete_field('ldap_authorizations'); |
|
345 | 341 |
|
346 | 342 |
} |
347 | 343 |
|
348 | 344 |
/** |
349 |
* make all schema field names lowercase in ldap server to deal with cronic case sensitivity issues
|
|
345 |
* Make all schema field names lowercase in ldap server to deal with cronic case sensitivity issues.
|
|
350 | 346 |
*/ |
351 | 347 |
function ldap_authorization_update_7203() { |
352 | 348 |
|
... | ... | |
368 | 364 |
} |
369 | 365 |
|
370 | 366 |
/** |
371 |
* make all schema field names lowercase in ldap server to deal with cronic case sensitivity issues
|
|
367 |
* Make all schema field names lowercase in ldap server to deal with cronic case sensitivity issues.
|
|
372 | 368 |
*/ |
373 | 369 |
function ldap_authorization_update_7204() { |
374 | 370 |
|
375 | 371 |
$schema = ldap_authorization_schema(); |
376 | 372 |
$field_schema = $schema['ldap_authorization']['fields']['mappings']; |
377 | 373 |
if (db_field_exists('ldap_authorization', 'mappings')) { |
378 |
db_change_field('ldap_authorization', 'mappings', 'mappings', $field_schema);
|
|
374 |
db_change_field('ldap_authorization', 'mappings', 'mappings', $field_schema); |
|
379 | 375 |
} |
380 | 376 |
|
381 | 377 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules