GetCQLDAPMap
Description
Returns the DevOps Plan user profile field that is used for correlating LDAP user records to DevOps Plan user records.
Returns a Long corresponding to a CQLDAPMap constant. Returns 0 if the mapping is not configured. May return an exception if there is an error connecting to the schema repository (that is, the master database).
The CQLDAPMap constant can be one of the following DevOps Plan user profile fields: Name, FullName, Phone, Email, and MiscInfo. The CQLDAPMap field is specified with the installutil setcqldapmap subcommand.
In a MultiSite environment, DevOps Plan enforces that the same CQLDAPMap field is used for all sites (that is, the same DevOps Plan User profile field), but allows that the LDAP attribute that is mapped may be site specific. This allows you to have different LDAP schemas at different sites, but allows DevOps Plan to enforce the uniqueness of the DevOps Plan mapping field values across an entire database set.
GetCQLDAPMap returns 0 if the database set has not been configured forDevOps Plan to LDAP mapping using the installutil setcqldapmap command.
Syntax
Perl
$adminSession->GetCQLDAPMap();
- Identifier
- Description
- adminSession
- The AdminSession object representing the current schema repository access session.
- Return value
- Returns a Long containing the CQLDAPMap value of the schema repository. Returns 0 if the mapping is not configured
Example
Perl
use CQPerlExt;
my $admin_user = shift;
my $admin_pwd = shift;
my $dbset = shift;
my $AdminSession = CQAdminSession::Build();
eval{$AdminSession->Logon($admin_user, $admin_pwd, $dbset);};
if ($@){print "Error: $@\n";}
my $map;
eval{$map = $AdminSession->GetCQLDAPMap();};
if ($@){print "Error: $@\n";}
if ($map == 0){ print "CQ to LDAP mapping not configured.
Run installutil setcqldapmap command\nn";
}
elseif ($map == $CQPerlExt::CQ_CQ_LOGIN_NAME){
print "Map to CQ_LOGIN_NAME\nn";
}
elsif ($map == $CQPerlExt::CQ_CQ_FULLNAME){
print "CQ Authmode for CQ_CQ_FULLNAME\n";
}
elsif ($map == $CQPerlExt::CQ_CQ_EMAIL){
print "CQ Authmode for CQ_CQ_EMAIL\n";
}
elsif ($map == $CQPerlExt::CQ_CQ_PHONE){
print "CQ Authmode for CQ_CQ_PHONE\n";
}
elsif ($map == $CQPerlExt::CQ_CQ_MISC_INFO){
print "CQ Authmode for CQ_CQ_MISC_INFO\n";
}
else{
print "Undefined map value - val was $map\n";
}
CQPerlExt::CQAdminSession_Unbuild($AdminSession);