diff --git a/src/controller/commands/Create.ts b/src/controller/commands/Create.ts index 1cc13f4..50fa678 100644 --- a/src/controller/commands/Create.ts +++ b/src/controller/commands/Create.ts @@ -28,9 +28,11 @@ class CreateCommand extends BaseCommand options: [{ name: 'name', type: OptionType.STRING, + flag: true }, { name: 'password', - type: OptionType.STRING + type: OptionType.STRING, + flag: true }, { name: 'admin', type: OptionType.BOOLEAN, diff --git a/src/util/PermissionManager.ts b/src/util/PermissionManager.ts index 0434675..aa88698 100644 --- a/src/util/PermissionManager.ts +++ b/src/util/PermissionManager.ts @@ -111,12 +111,12 @@ class PermissionManager { if (typeof to[key] === 'object') { - PermissionManager.merge(to[key] as Permissions, from[key] as Permissions); + PermissionManager.merge(to[key] as Permissions, from[key] as Permissions, overwrite); } else if (typeof from[key] === 'object') { to[key] = { default: to[key] || 0 }; - PermissionManager.merge(to[key] as Permissions, from[key] as Permissions); + PermissionManager.merge(to[key] as Permissions, from[key] as Permissions, overwrite); } else if (!(key in to) || overwrite) {