Révision bc175c27
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/ldap/ldap_authorization/ldap_authorization.api.php | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* summary of hooks and other developer related functions
|
|
5 |
* Summary of hooks and other developer related functions.
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 |
* Allow a custom module to alter ldap_authorization mappings |
|
9 |
* Allow a custom module to alter ldap_authorization mappings. |
|
10 |
* |
|
11 |
* @param object $user |
|
12 |
* as drupal acct object. |
|
13 |
* @param array $ldap_user |
|
14 |
* See ldap_authentication/README.developers.txt for structure. |
|
15 |
* @param LdapServer $ldap_server |
|
16 |
* The ldap server associated with this consumer type. |
|
17 |
* @param LdapAuthorizationConsumerConf $consumer_conf |
|
18 |
* The ldap consumer configuraion associated with this consumer type. |
|
19 |
* @param array $proposed_ldap_authorizations |
|
20 |
* with keys of consumer ids |
|
21 |
* and values of consumers (drupal roles, og entity, etc.) |
|
10 | 22 |
* |
11 |
* @param object $user as drupal acct object |
|
12 |
* @param array $ldap_user |
|
13 |
* See ldap_authentication/README.developers.txt for structure |
|
14 |
* @param LdapServer $ldap_server |
|
15 |
* The ldap server associated with this consumer type |
|
16 |
* @param LdapAuthorizationConsumerConf $consumer_conf |
|
17 |
* The ldap consumer configuraion associated with this consumer type |
|
18 |
* @param array $proposed_ldap_authorizations with keys of consumer ids |
|
19 |
* and values of consumers (drupal roles, og entity, etc.) |
|
20 |
|
|
21 | 23 |
* |
22 |
* alters $proposed_ldap_authorizations by reference
|
|
24 |
* alters $proposed_ldap_authorizations by reference.
|
|
23 | 25 |
*/ |
24 |
|
|
25 |
|
|
26 |
|
|
27 | 26 |
function hook_ldap_authorization_maps_alter($user, $ldap_user, $ldap_server, $consumer_conf, $proposed_ldap_authorizations, $op) { |
28 | 27 |
|
29 |
|
|
30 | 28 |
} |
31 | 29 |
|
32 |
|
|
33 | 30 |
/** |
34 | 31 |
* Allow a custom module to alter ldap_authorizations after they have been determined by ldap_authorizations, |
35 | 32 |
* but before they are granted/removed from user. |
36 | 33 |
* |
37 |
* @param array $authorizations as proposed authorizations for user. |
|
38 |
* will be in format returned by LdapAuthorizationConsumerX::populateConsumersFromConsumerIds |
|
34 |
* @param array $authorizations |
|
35 |
* as proposed authorizations for user. |
|
36 |
* will be in format returned by LdapAuthorizationConsumerX::populateConsumersFromConsumerIds. |
|
39 | 37 |
* |
40 |
* @param array $params with the following key/value pairs |
|
41 |
* 'ldap_user' => See ldap_authentication/README.developers.txt for structure |
|
38 |
* @param array $params |
|
39 |
* with the following key/value pairs |
|
40 |
* 'ldap_user' => See ldap_authentication/README.developers.txt for structure |
|
42 | 41 |
* 'ldap_server' => the LdapServer object for this consumer type |
43 | 42 |
* 'consumer' => LdapAuthorizationConsumerX object |
44 | 43 |
* 'user' => Drupal user account object |
45 | 44 |
* |
46 |
* alters $proposed_ldap_authorizations by reference
|
|
45 |
* alters $proposed_ldap_authorizations by reference.
|
|
47 | 46 |
*/ |
48 |
|
|
49 | 47 |
function hook_ldap_authorization_authorizations_alter($authorizations, $params) { |
50 | 48 |
|
51 |
// alter authorizations |
|
52 |
|
|
49 |
// Alter authorizations. |
|
53 | 50 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules