Styling
This commit is contained in:
parent
7e43cb5f18
commit
6b64074920
@ -99,7 +99,7 @@ async function register ({
|
|||||||
label: 'Group property',
|
label: 'Group property',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
private: true,
|
private: true,
|
||||||
descriptionHTML: 'Property/claim that contains a users groups'
|
descriptionHTML: 'Property/claim that contains user groups (array)'
|
||||||
})
|
})
|
||||||
|
|
||||||
registerSetting({
|
registerSetting({
|
||||||
@ -286,8 +286,9 @@ async function handleCb (peertubeHelpers, settingsManager, req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (settings['group-property'] && settings['allowed-group']) {
|
if (settings['group-property'] && settings['allowed-group']) {
|
||||||
let roles = userInfo[settings['group-property']]
|
const groups = userInfo[settings['group-property']]
|
||||||
if (!roles.includes(settings['allowed-group'])) {
|
|
||||||
|
if (!groups.includes(settings['allowed-group'])) {
|
||||||
throw {
|
throw {
|
||||||
name: "AllowedGroupNotFound",
|
name: "AllowedGroupNotFound",
|
||||||
message: "User is not in allowed group"
|
message: "User is not in allowed group"
|
||||||
|
Loading…
Reference in New Issue
Block a user