UNPKG

@itwin/imodels-client-management

Version:

iModels API client wrapper for applications that manage iModels.

32 lines 1.82 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UserPermissionOperations = void 0; /*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ const internal_1 = require("../../base/internal"); class UserPermissionOperations extends internal_1.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; } } exports.UserPermissionOperations = UserPermissionOperations; //# sourceMappingURL=UserPermissionOperations.js.map