From 6b640749205671cc714b41a106d6be62841096e0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 30 Jun 2021 16:47:04 +0200 Subject: [PATCH] Styling --- peertube-plugin-auth-openid-connect/main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/peertube-plugin-auth-openid-connect/main.js b/peertube-plugin-auth-openid-connect/main.js index 974f320..052e2f1 100644 --- a/peertube-plugin-auth-openid-connect/main.js +++ b/peertube-plugin-auth-openid-connect/main.js @@ -99,7 +99,7 @@ async function register ({ label: 'Group property', type: 'input', private: true, - descriptionHTML: 'Property/claim that contains a users groups' + descriptionHTML: 'Property/claim that contains user groups (array)' }) registerSetting({ @@ -286,8 +286,9 @@ async function handleCb (peertubeHelpers, settingsManager, req, res) { } if (settings['group-property'] && settings['allowed-group']) { - let roles = userInfo[settings['group-property']] - if (!roles.includes(settings['allowed-group'])) { + const groups = userInfo[settings['group-property']] + + if (!groups.includes(settings['allowed-group'])) { throw { name: "AllowedGroupNotFound", message: "User is not in allowed group"