public function LdapAuthorizationConsumerAbstract::normalizeMappings in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::normalizeMappings()
- 7 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::normalizeMappings()
Function to normalize mappings.
Should be overridden when mappings are not stored as map|authorization_id format where authorization_id is the format returned by LdapAuthorizationConsumerAbstract::usersAuthorizations()
For example ldap_authorization_og may store mapping target as: Campus Accounts|group-name=knitters,role-name=administrator member normalized mappings are of form such as for organic groups: [ [ 'from' => 'students', 'normalized' => 'node:21:1', 'simplified' => 'node:students:member', 'user_entered' => 'students' 'valid' => TRUE, 'error_message' => '', ], ... ]
Or for Drupal role where rid 3 is moderator and rid 2 is admin: [ [ 'from' => 'students', 'normalized' => '2', 'simplified' => 'admin', 'user_entered' => 'admin', 'valid' => TRUE, 'error_message' => '', ], ... ]
Where 'normalized' is in id format and 'simplified' is user shorthand.
2 methods override LdapAuthorizationConsumerAbstract::normalizeMappings()
- LdapAuthorizationConsumerDrupalRole::normalizeMappings in ldap_authorization/
ldap_authorization_drupal_role/ LdapAuthorizationConsumerRole.class.php - LdapAuthorizationConsumerOG::normalizeMappings in ldap_authorization/
ldap_authorization_og/ LdapAuthorizationConsumerOG.class.php
File
- ldap_authorization/
LdapAuthorizationConsumerAbstract.class.php, line 166 - Abstract class to represent an ldap_authorization consumer behavior such as drupal_role, og_group, etc. each authorization comsumer will extend this class with its own class named LdapAuthorizationConsumer<consumer type> such as…
Class
Code
public function normalizeMappings($mappings) {
return $mappings;
}