mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
move logic for group routine to wekan-oidc package
This commit is contained in:
parent
02fe918388
commit
d90e78e417
1 changed files with 5 additions and 3 deletions
|
|
@ -81,7 +81,6 @@ OAuth.registerService('oidc', 2, null, function (query) {
|
||||||
|
|
||||||
//temporarily store data from oidc in user.services.oidc.groups to update groups
|
//temporarily store data from oidc in user.services.oidc.groups to update groups
|
||||||
serviceData.groups = (userinfo["groups"] && userinfo["wekanGroups"]) ? userinfo["wekanGroups"] : userinfo["groups"];
|
serviceData.groups = (userinfo["groups"] && userinfo["wekanGroups"]) ? userinfo["wekanGroups"] : userinfo["groups"];
|
||||||
|
|
||||||
// groups arriving as array of strings indicate there is no scope set in oidc privider
|
// groups arriving as array of strings indicate there is no scope set in oidc privider
|
||||||
// to assign teams and keep admin privileges
|
// to assign teams and keep admin privileges
|
||||||
// data needs to be treated differently.
|
// data needs to be treated differently.
|
||||||
|
|
@ -105,6 +104,9 @@ OAuth.registerService('oidc', 2, null, function (query) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Meteor.call('groupRoutineOnLogin',serviceData, serviceData.id);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
serviceData: serviceData,
|
serviceData: serviceData,
|
||||||
options: { profile: profile }
|
options: { profile: profile }
|
||||||
|
|
@ -285,9 +287,9 @@ Meteor.methods({
|
||||||
var propagateOidcData = process.env.PROPAGATE_OIDC_DATA || false;
|
var propagateOidcData = process.env.PROPAGATE_OIDC_DATA || false;
|
||||||
if (propagateOidcData)
|
if (propagateOidcData)
|
||||||
{
|
{
|
||||||
|
|
||||||
users= Meteor.users;
|
users= Meteor.users;
|
||||||
user = users.findOne({'_id': userId});
|
user = users.findOne({'services.oidc.id': userId});
|
||||||
|
|
||||||
if(user)
|
if(user)
|
||||||
{
|
{
|
||||||
//updates/creates Groups and user admin privileges accordingly
|
//updates/creates Groups and user admin privileges accordingly
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue