UNPKG

@itwin/imodels-client-management

Version:

iModels API client wrapper for applications that manage iModels.

28 lines 1.64 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ import { OperationsBase } from "../../base/internal"; export class UserPermissionOperations extends OperationsBase { /** * Retrieves Permissions the current user has for the specified iModel. The current user is determined based on * passed authorization information. Wraps the * {@link https://developer.bentley.com/apis/imodels-v2/operations/get-imodel-user-permissions/ Get iModel User Permissions} * operation from iModels API. iModels Permissions may be configured on a iTwin level or an iModel level. * This operation will return Permissions configured for this specific iModel or iTwin Permissions if iModel * Permissions are not configured. * @param {GetUserPermissionsParams} params parameters for this operation. See {@link GetUserPermissionsParams}. * @returns {Promise<UserPermissions>} User Permissions. See {@link UserPermissions}. */ async get(params) { const response = await this.sendGetRequest({ authorization: params.authorization, url: this._options.urlFormatter.getUserPermissionsUrl({ iModelId: params.iModelId, }), headers: params.headers, }); return response.body; } } //# sourceMappingURL=UserPermissionOperations.js.map