Added channel overrides section to admin panel
This commit is contained in:
parent
68f9d5af06
commit
33026a1265
7 changed files with 113 additions and 42 deletions
|
|
@ -27,7 +27,7 @@ module.exports.isRank = function(value){
|
|||
}
|
||||
|
||||
module.exports.permissionsValidator = {
|
||||
permissionsMap: () => checkExact(checkSchema({
|
||||
permissionsMap: () => checkSchema({
|
||||
'permissionsMap.adminPanel': {
|
||||
optional: true,
|
||||
custom: {
|
||||
|
|
@ -58,24 +58,22 @@ module.exports.permissionsValidator = {
|
|||
options: module.exports.isRank
|
||||
},
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
module.exports.channelPermissionValidatorSchema = {
|
||||
'channelPermissionsMap.manageChannel': {
|
||||
optional: true,
|
||||
custom: {
|
||||
options: module.exports.isRank
|
||||
},
|
||||
},
|
||||
'channelPermissionsMap.deleteChannel': {
|
||||
optional: true,
|
||||
custom: {
|
||||
options: module.exports.isRank
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.channelPermissionValidator = {
|
||||
channelPermissionsMap: () => checkExact(checkSchema(module.exports.channelPermissionValidatorSchema))
|
||||
channelPermissionsMap: () => checkSchema({
|
||||
'channelPermissionsMap.manageChannel': {
|
||||
optional: true,
|
||||
custom: {
|
||||
options: module.exports.isRank
|
||||
},
|
||||
},
|
||||
'channelPermissionsMap.deleteChannel': {
|
||||
optional: true,
|
||||
custom: {
|
||||
options: module.exports.isRank
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue