You are here

public function LdapAuthorizationConsumerAbstract::sortConsumerIds in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::sortConsumerIds()
  2. 7 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::sortConsumerIds()

Some authorization schemes such as organic groups, require a certain order. implement this method to sort consumer ids/authorization ids.

Parameters

string $op: 'grant' or 'revoke' signifying what to do with the $consumer_ids.

$consumers: associative array in form of LdapAuthorizationConsumerAbstract::populateConsumersFromConsumerIds

alters $consumers by reference

1 call to LdapAuthorizationConsumerAbstract::sortConsumerIds()
LdapAuthorizationConsumerAbstract::grantsAndRevokes in ldap_authorization/LdapAuthorizationConsumerAbstract.class.php
1 method overrides LdapAuthorizationConsumerAbstract::sortConsumerIds()
LdapAuthorizationConsumerOG::sortConsumerIds in ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php
In organic groups 7.x-1.x, consumer ids are in form gid-rid such as 3-2, 3-3. We want highest authorization available granted. But, granting member role (2), revokes other roles such as admin in OG. So for granting we want the order: 3-1, 3-2, 3-3…

File

ldap_authorization/LdapAuthorizationConsumerAbstract.class.php, line 295
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

Code

public function sortConsumerIds($op, &$consumers) {
}