UNPKG

woltlab-compiler

Version:

A compiler for WoltLab-Package Archives and WoltLab-Package Components

81 lines 2.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const util_1 = require("util"); const Option_1 = require("../Option"); /** * Represents an option which controls the permission of a user-group. */ class GroupOption extends Option_1.Option { /** * Initializes a new instance of the `GroupOption` class. */ constructor(category, options) { super(category, options); /** * The default value for groups which apply to registered users. */ this.userDefaultValue = null; /** * The default value for groups which have access to the moderation-section. */ this.modDefaultValue = null; /** * The default value for groups with administrator permissions. */ this.adminDefaultValue = null; /** * A value indicating whether the option only applies to groups for registered users. */ this.registeredOnly = false; if (!util_1.isNullOrUndefined(options.UserDefaultValue)) { this.UserDefaultValue = options.UserDefaultValue; } if (!util_1.isNullOrUndefined(options.ModDefaultValue)) { this.ModDefaultValue = options.ModDefaultValue; } if (!util_1.isNullOrUndefined(options.AdminDefaultValue)) { this.AdminDefaultValue = options.AdminDefaultValue; } if (!util_1.isNullOrUndefined(options.RegisteredOnly)) { this.RegisteredOnly = options.RegisteredOnly; } } /** * Gets or sets the default value for groups which apply to registered users. */ get UserDefaultValue() { return this.userDefaultValue; } set UserDefaultValue(value) { this.userDefaultValue = value; } /** * Gets or sets the default value for groups which have access to the moderation-section. */ get ModDefaultValue() { return this.modDefaultValue; } set ModDefaultValue(value) { this.modDefaultValue = value; } /** * Gets or sets the default value for groups with administrator permissions. */ get AdminDefaultValue() { return this.adminDefaultValue; } set AdminDefaultValue(value) { this.adminDefaultValue = value; } /** * Gets or sets a value indicating whether the option only applies to groups for registered users. */ get RegisteredOnly() { return this.registeredOnly; } set RegisteredOnly(value) { this.registeredOnly = value; } } exports.GroupOption = GroupOption; //# sourceMappingURL=GroupOption.js.map