사용자

설명

스키마 저장소에 연관된 사용자 콜렉션을 리턴합니다. 이는 읽기 전용 특성입니다. 즉, 볼 수는 있으나 설정할 수는 없습니다.

리턴된 콜렉션에 있는 각 요소는 User 오브젝트입니다.

구문

VBScript

adminSession.Users 

Perl

$adminSession->GetUsers(); 
ID
설명
adminSession
현재 스키마 저장소 액세스 세션을 나타내는 AdminSession 오브젝트.
Return value
스키마 저장소의 모든 사용자를 포함하는 Users 오브젝트.

예제

VBScript

set adminSession = CreateObject("ClearQuest.AdminSession") 
set Session = CreateObject("ClearQuest.Session")

adminSession.Logon "admin", "admin", ""

set userList = adminSession.Users

For each userObj in userList
  userName = userObj.Name
  SessionObj.OutputDebugString "Found user: " & userName
Next

Perl

use CQPerlExt;
#Create a Rational ClearQuest admin session
$adminSession= CQAdminSession::Build(); 

#Logon as admin 
$adminSession->Logon( "admin", "admin", "" ); 

#Get the list of users in the repository.
$userList = $adminSession->GetUsers();

#Get the number of users
$numUsers = $userList->Count();

#Iterate through the users
for ( $x=0; $x<$numUsers; $x++ ) {
     #Get the specified item in the collection of users
     $userObj = $userList->Item( $x );
     #Get the name of the user
     $userName = $userObj->GetName();
}

CQAdminSession::Unbuild($adminSession);

피드백