bugfix to permission merge
This commit is contained in:
parent
b4cec3f1a5
commit
9e5fd57971
@ -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,
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user