UNPKG

diffusion

Version:

Diffusion JavaScript client

36 lines (35 loc) 1.05 kB
"use strict"; /** * @module Features.Security */ Object.defineProperty(exports, "__esModule", { value: true }); exports.SystemPrincipalImpl = void 0; /** * Implementation of {@link SystemPrincipal} * * @inheritdoc */ var SystemPrincipalImpl = /** @class */ (function () { /** * Create a SystemPrincipalImpl instance * * @param name the principal name * @param roles the principal's assigned roles * @throws a {@link NullValueError} if name is null or undefined */ function SystemPrincipalImpl(name, roles, lockingPrincipal) { this.name = name; this.roles = roles || []; this.lockingPrincipal = lockingPrincipal; } /** * Convert object to string * * @return a string representation of the SystemPrincipalImpl */ SystemPrincipalImpl.prototype.toString = function () { return "SystemPrincipal [" + this.name + ", " + this.roles + "]"; }; return SystemPrincipalImpl; }()); exports.SystemPrincipalImpl = SystemPrincipalImpl;