SetCQAuthentication

Descrizione

Imposta un AuthenticationMode di account utente su CQ_AUTHENTICATION, che utilizza l'autenticazione utente abilitata tradizionale Rational ClearQuest.

Impostare AuthenticationMode per l'utente su CQ_AUTHENTICATION imposta la password dell'account utente Rational ClearQuest sull'argomento new_password quindi memorizzato come la password Rational ClearQuest nel database Rational ClearQuest, come per tutti gli utenti autenticati Rational ClearQuest tradizionali.

Nota: il chiamante di questo metodo deve disporre dei privilegi di Amministratore (ovvero, un valore UserPrivilegeMaskType, USER_ADMIN) per impostare questo valore. Rational ClearQuest impedisce ai Super utenti di impostare la propria AuthenticationMode.
Nota: questo metodo è stato reso disponibile nella versione 2003.06.14.

Sintassi

VBScript

user.SetCQAuthentication(new_password) 

Perl

user->SetCQAuthentication(new_password); 
Identificativo
Descrizione
user
Un oggetto User.
new_password
Una stringa che specifica la password utente. Questo valore ripristina la password utente Rational ClearQuest su questo nuovo valore.
Valore di ritorno
Nessuno in caso di operazione riuscita, in caso contrario restituisce un'eccezione.

Esempi

VBScript

'set the user authentication mode to cq:   
   Dim cquser2 ' a user object 
   Dim passwd
   passwd = ""
   Dim mode ' the user authentication mode
   StdOut "Setting CQ authentication for " & cquser2.name & vbCrLf
   cquser2.SetCQAuthentication passwd
   ' verify the user authentication mode:  
   StdOut "Getting authentication mode for user " & cquser2.name
	 & vbCrLf
   mode = cquser2.GetAuthenticationMode
   StdOut "user mode: " & CStr(mode) & vbCrLf

Perl

# Set user's authentication to CQ authenticated
sub set_cq_auth
{
	my ($user, $newpwd) = @_;
	eval{$user->SetCQAuthentication($newpwd);};
	if ($@)
	{
		print "Couldnt run user->SetCQAuthentication.  Error: $@\n";
		die;
	}
}

Feedback