lib/Auth/Process/PerunGroups.php
protected function mapGroupName($request, $groupName)
    {
        if (isset($request["SPMetadata"]["groupMapping"]) &&
            isset($request["SPMetadata"]["groupMapping"][$groupName])) {
            Logger::debug(
                "Mapping $groupName to " . $request["SPMetadata"]["groupMapping"][$groupName] .
                " for SP " . $request["SPMetadata"]["entityid"]
            );
            return $request["SPMetadata"]["groupMapping"][$groupName];
        } elseif (isset($request["SPMetadata"][self::GROUPNAMEPREFIX_ATTR])) {
            Logger::debug(
                "GroupNamePrefix overridden by a SP " . $request["SPMetadata"]["entityid"] .
                " to " . $request["SPMetadata"][self::GROUPNAMEPREFIX_ATTR]
            );
            return $request["SPMetadata"][self::GROUPNAMEPREFIX_ATTR] . $groupName;
        } else {
            # No mapping defined, so just put groupNamePrefix in front of the group
            Logger::debug(
                "No mapping found for group $groupName for SP " . $request["SPMetadata"]["entityid"]
            );
            return $this->groupNamePrefix . $groupName;
        }
    }
protected function mapGroupName($request, $groupName)
    {
        if (isset($request["SPMetadata"]["groupMapping"]) &&
            isset($request["SPMetadata"]["groupMapping"][$groupName])) {
            Logger::debug(
                "Mapping $groupName to " . $request["SPMetadata"]["groupMapping"][$groupName] .
                " for SP " . $request["SPMetadata"]["entityid"]
            );
            return $request["SPMetadata"]["groupMapping"][$groupName];
        } elseif (isset($request["SPMetadata"][self::GROUPNAMEPREFIX_ATTR])) {
            Logger::debug(
                "GroupNamePrefix overridden by a SP " . $request["SPMetadata"]["entityid"] .
                " to " . $request["SPMetadata"][self::GROUPNAMEPREFIX_ATTR]
            );
            return $request["SPMetadata"][self::GROUPNAMEPREFIX_ATTR] . $groupName;
        } else {
            # No mapping defined, so just put groupNamePrefix in front of the group
            Logger::debug(
                "No mapping found for group $groupName for SP " . $request["SPMetadata"]["entityid"]
            );
            return $this->groupNamePrefix . $groupName;
        }
    }
protected function mapGroupName ( $ request , $ groupName ) { if ( isset ( $ request [ "SPMetadata" ] [ "groupMapping" ] ) && isset ( $ request [ "SPMetadata" ] [ "groupMapping" ] [ $ groupName ] ) ) { Logger :: debug ( "Mapping $groupName to " . $ request [ "SPMetadata" ] [ "groupMapping" ] [ $ groupName ] . " for SP " . $ request [ "SPMetadata" ] [ "entityid" ] ) ; return $ request [ "SPMetadata" ] [ "groupMapping" ] [ $ groupName ] ; } elseif ( isset ( $ request [ "SPMetadata" ] [ self :: GROUPNAMEPREFIX_ATTR ] ) ) { Logger :: debug ( "GroupNamePrefix overridden by a SP " . $ request [ "SPMetadata" ] [ "entityid" ] . " to " . $ request [ "SPMetadata" ] [ self :: GROUPNAMEPREFIX_ATTR ] ) ; return $ request [ "SPMetadata" ] [ self :: GROUPNAMEPREFIX_ATTR ] . $ groupName ; } else { # No mapping defined, so just put groupNamePrefix in front of the group Logger :: debug ( "No mapping found for group $groupName for SP " . $ request [ "SPMetadata" ] [ "entityid" ] ) ; return $ this -> groupNamePrefix . $ groupName ; } }
This method translates given name of group based on associative array 'groupMapping' in SP metadata.
@param $request
@param string $groupName
@return string translated group name
This method translates given name of group based on associative array groupMapping in SP metadata .