You are here

public function LdapAuthorizationConsumerAbstract::normalizeMappings in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::normalizeMappings()
  2. 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:

array( array( '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: array( array( '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 134
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

LdapAuthorizationConsumerAbstract
@file

Code

public function normalizeMappings($mappings) {
  return $mappings;
}