mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
5.1 KiB
69 lines
5.1 KiB
/**
|
|
* @fileoverview added by tsickle
|
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
*/
|
|
import { Injectable } from '@angular/core';
|
|
import { RestService } from '@abp/ng.core';
|
|
import * as i0 from "@angular/core";
|
|
import * as i1 from "@abp/ng.core";
|
|
var PermissionManagementService = /** @class */ (function () {
|
|
function PermissionManagementService(rest) {
|
|
this.rest = rest;
|
|
}
|
|
/**
|
|
* @param {?} params
|
|
* @return {?}
|
|
*/
|
|
PermissionManagementService.prototype.getPermissions = /**
|
|
* @param {?} params
|
|
* @return {?}
|
|
*/
|
|
function (params) {
|
|
/** @type {?} */
|
|
var request = {
|
|
method: 'GET',
|
|
url: '/api/abp/permissions',
|
|
params: params,
|
|
};
|
|
return this.rest.request(request);
|
|
};
|
|
/**
|
|
* @param {?} __0
|
|
* @return {?}
|
|
*/
|
|
PermissionManagementService.prototype.updatePermissions = /**
|
|
* @param {?} __0
|
|
* @return {?}
|
|
*/
|
|
function (_a) {
|
|
var permissions = _a.permissions, providerKey = _a.providerKey, providerName = _a.providerName;
|
|
/** @type {?} */
|
|
var request = {
|
|
method: 'PUT',
|
|
url: '/api/abp/permissions',
|
|
body: { permissions: permissions },
|
|
params: { providerKey: providerKey, providerName: providerName },
|
|
};
|
|
return this.rest.request(request);
|
|
};
|
|
PermissionManagementService.decorators = [
|
|
{ type: Injectable, args: [{
|
|
providedIn: 'root',
|
|
},] }
|
|
];
|
|
/** @nocollapse */
|
|
PermissionManagementService.ctorParameters = function () { return [
|
|
{ type: RestService }
|
|
]; };
|
|
/** @nocollapse */ PermissionManagementService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function PermissionManagementService_Factory() { return new PermissionManagementService(i0.ɵɵinject(i1.RestService)); }, token: PermissionManagementService, providedIn: "root" });
|
|
return PermissionManagementService;
|
|
}());
|
|
export { PermissionManagementService };
|
|
if (false) {
|
|
/**
|
|
* @type {?}
|
|
* @private
|
|
*/
|
|
PermissionManagementService.prototype.rest;
|
|
}
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVybWlzc2lvbi1tYW5hZ2VtZW50LnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYWJwL25nLnBlcm1pc3Npb24tbWFuYWdlbWVudC8iLCJzb3VyY2VzIjpbImxpYi9zZXJ2aWNlcy9wZXJtaXNzaW9uLW1hbmFnZW1lbnQuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsV0FBVyxFQUFRLE1BQU0sY0FBYyxDQUFDOzs7QUFJakQ7SUFJRSxxQ0FBb0IsSUFBaUI7UUFBakIsU0FBSSxHQUFKLElBQUksQ0FBYTtJQUFHLENBQUM7Ozs7O0lBRXpDLG9EQUFjOzs7O0lBQWQsVUFBZSxNQUE0Qzs7WUFDbkQsT0FBTyxHQUF1RDtZQUNsRSxNQUFNLEVBQUUsS0FBSztZQUNiLEdBQUcsRUFBRSxzQkFBc0I7WUFDM0IsTUFBTSxRQUFBO1NBQ1A7UUFFRCxPQUFPLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFzRSxPQUFPLENBQUMsQ0FBQztJQUN6RyxDQUFDOzs7OztJQUVELHVEQUFpQjs7OztJQUFqQixVQUFrQixFQUkwRDtZQUgxRSw0QkFBVyxFQUNYLDRCQUFXLEVBQ1gsOEJBQVk7O1lBRU4sT0FBTyxHQUFxRDtZQUNoRSxNQUFNLEVBQUUsS0FBSztZQUNiLEdBQUcsRUFBRSxzQkFBc0I7WUFDM0IsSUFBSSxFQUFFLEVBQUUsV0F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