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.
61 lines
4.5 KiB
61 lines
4.5 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";
|
|
export class PermissionManagementService {
|
|
/**
|
|
* @param {?} rest
|
|
*/
|
|
constructor(rest) {
|
|
this.rest = rest;
|
|
}
|
|
/**
|
|
* @param {?} params
|
|
* @return {?}
|
|
*/
|
|
getPermissions(params) {
|
|
/** @type {?} */
|
|
const request = {
|
|
method: 'GET',
|
|
url: '/api/abp/permissions',
|
|
params,
|
|
};
|
|
return this.rest.request(request);
|
|
}
|
|
/**
|
|
* @param {?} __0
|
|
* @return {?}
|
|
*/
|
|
updatePermissions({ permissions, providerKey, providerName, }) {
|
|
/** @type {?} */
|
|
const request = {
|
|
method: 'PUT',
|
|
url: '/api/abp/permissions',
|
|
body: { permissions },
|
|
params: { providerKey, providerName },
|
|
};
|
|
return this.rest.request(request);
|
|
}
|
|
}
|
|
PermissionManagementService.decorators = [
|
|
{ type: Injectable, args: [{
|
|
providedIn: 'root',
|
|
},] }
|
|
];
|
|
/** @nocollapse */
|
|
PermissionManagementService.ctorParameters = () => [
|
|
{ type: RestService }
|
|
];
|
|
/** @nocollapse */ PermissionManagementService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function PermissionManagementService_Factory() { return new PermissionManagementService(i0.ɵɵinject(i1.RestService)); }, token: PermissionManagementService, providedIn: "root" });
|
|
if (false) {
|
|
/**
|
|
* @type {?}
|
|
* @private
|
|
*/
|
|
PermissionManagementService.prototype.rest;
|
|
}
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic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