사용 권한 API 확인
Power BI 시각적 개체의 개발자는 다양한 리소스에 액세스할 수 있는 권한이 필요한 시각적 개체를 개발할 수 있습니다. capabilities.json 파일의 권한 섹션에서 이러한 권한을 요청합니다. 이러한 권한에는 다음과 같은 액세스 권한이 포함됩니다.
- 원격 리소스 또는 웹 사이트
- 데이터 다운로드를 위한 로컬 스토리지
각 조직의 관리자는 이러한 권한을 허용하거나 차단할 수 있습니다. 사용 권한 API 확인을 사용하면 런타임에 호스트를 쿼리하여 부여된 권한을 확인할 수 있습니다. 이 정보를 사용하여 다양한 사용 권한 설정으로 작동하는 시각적 개체를 디자인할 수 있습니다.
사용 권한 API 확인은 각 권한 쿼리 함수의 상태를 반환합니다.
/**
* Represents a return type for privilege status query methods
*/
export const enum PrivilegeStatus {
/**
* The privilege is allowed in the current environment
*/
Allowed,
/**
* The privilege declaration is missing in visual capabilities section
*/
NotDeclared,
/**
* The privilege is not supported in the current environment
*/
NotSupported,
/**
* The privilege usage was denied by tenant administrator
*/
DisabledByAdmin,
}
사용 권한 API 확인을 사용하는 방법
모든 권한 API에는 사용 권한 상태를 확인하는 고유한 쿼리 메서드가 있습니다. 사용 권한 상태는 다음 중 하나로 표시될 수 있습니다.
- 허용됨
- 선언되지 않음
- 지원되지 않음
- 관리자에 의해 사용하지 않도록 설정됨
웹 액세스
export interface IWebAccessService {
/**
* Returns the availability status of the service for specified url.
*
* @param url - the URL to check status for
* @returns the promise that resolves to privilege status of the service
*/
webAccessStatus(url: string): IPromise<PrivilegeStatus>;
}
콘텐츠 내보내기
export interface IDownloadService {
/**
* Returns the availability status of the service.
*
* @returns the promise that resolves to privilege status of the service
*/
exportStatus(): IPromise<PrivilegeStatus>;
}