Share via


Sys.Services RoleService roles 속성

업데이트: 2007년 11월

현재 인증된 사용자의 역할을 가져옵니다.

참고

클라이언트 API 속성에 대한 속성 값을 가져오거나 설정하려면 이름에 get_set_ 접두사가 붙은 속성 접근자 메서드를 호출해야 합니다. 예를 들어 cancel과 같은 속성의 값을 가져오거나 설정하려면 get_cancel 또는 set_cancel 메서드를 호출합니다.

var roles = Sys.Services.RoleService.get_roles();

반환 값

역할을 포함하는 Array 인스턴스입니다.

설명

roles 속성에 액세스하려면 먼저 load 메서드를 사용하여 역할을 로드해야 합니다. 역할을 로드하지 않거나 역할이 정의되어 있지 않으면 빈 array가 반환됩니다.

예제

다음 예제에서는 roles 속성을 사용하는 방법을 보여 줍니다. 이 코드는 RoleService 클래스 개요에서 볼 수 있는 전체 예제의 일부입니다.

// This function gets the role service timeout.
function GetRoleServiceTimeout()
{
    // Get the role service path.
    var roleServiceTimeout = 
        Sys.Services.RoleService.get_timeout();

    DisplayInformation(
            "Role service timeout: " + roleServiceTimeout);

}

참고 항목

개념

Sys.Services.AuthenticationService 클래스

Sys.Services.ProfileService 클래스