mirror of
https://github.com/wekan/wekan.git
synced 2025-12-26 20:28:48 +01:00
Merge pull request #4450 from danielkaiser/fix-oidc-no-groups-in-userinfo
Fix oidc login when no group data is present
This commit is contained in:
commit
08f188c45f
1 changed files with 1 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ OAuth.registerService('oidc', 2, null, function (query) {
|
|||
// data needs to be treated differently.
|
||||
// use case: in oidc provider no scope is set, hence no group attributes.
|
||||
// therefore: keep admin privileges for wekan as before
|
||||
if(typeof serviceData.groups[0] === "string" )
|
||||
if(Array.isArray(serviceData.groups) && serviceData.groups.length && typeof serviceData.groups[0] === "string" )
|
||||
{
|
||||
user = Meteor.users.findOne({'_id': serviceData.id});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue