mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 16:00:13 +01:00
Edit profil and change password menus are not displayed when SSO authentication is used
This commit is contained in:
parent
6d9d69e01d
commit
c7cc9273a6
5 changed files with 21 additions and 8 deletions
|
|
@ -156,6 +156,7 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
if (FlowRouter.getRouteName() === 'home'){
|
if (FlowRouter.getRouteName() === 'home'){
|
||||||
query.$and[2].$or.push({'members.userId': Meteor.userId()});
|
query.$and[2].$or.push({'members.userId': Meteor.userId()});
|
||||||
|
|
||||||
if(allowPrivateVisibilityOnly !== undefined && allowPrivateVisibilityOnly.booleanValue){
|
if(allowPrivateVisibilityOnly !== undefined && allowPrivateVisibilityOnly.booleanValue){
|
||||||
query.$and.push({'permission': 'private'});
|
query.$and.push({'permission': 'private'});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ template(name="memberMenuPopup")
|
||||||
i.fa.fa-lock
|
i.fa.fa-lock
|
||||||
| {{_ 'admin-panel'}}
|
| {{_ 'admin-panel'}}
|
||||||
hr
|
hr
|
||||||
|
if isNotOAuth2AuthenticationMethod
|
||||||
li
|
li
|
||||||
a.js-edit-profile
|
a.js-edit-profile
|
||||||
i.fa.fa-user
|
i.fa.fa-user
|
||||||
|
|
@ -62,6 +63,7 @@ template(name="memberMenuPopup")
|
||||||
i.fa.fa-picture-o
|
i.fa.fa-picture-o
|
||||||
| {{_ 'edit-avatar'}}
|
| {{_ 'edit-avatar'}}
|
||||||
unless isSandstorm
|
unless isSandstorm
|
||||||
|
if isNotOAuth2AuthenticationMethod
|
||||||
li
|
li
|
||||||
a.js-change-password
|
a.js-change-password
|
||||||
i.fa.fa-key
|
i.fa.fa-key
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,14 @@ Template.memberMenuPopup.helpers({
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isNotOAuth2AuthenticationMethod(){
|
||||||
|
currentUser = Meteor.user();
|
||||||
|
if (currentUser) {
|
||||||
|
return currentUser.authenticationMethod != 'OAuth2';
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.memberMenuPopup.events({
|
Template.memberMenuPopup.events({
|
||||||
|
|
|
||||||
|
|
@ -445,6 +445,7 @@ Users.safeFields = {
|
||||||
'profile.initials': 1,
|
'profile.initials': 1,
|
||||||
orgs: 1,
|
orgs: 1,
|
||||||
teams: 1,
|
teams: 1,
|
||||||
|
authenticationMethod: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Meteor.isClient) {
|
if (Meteor.isClient) {
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ Meteor.publish('user-admin', function() {
|
||||||
isAdmin: 1,
|
isAdmin: 1,
|
||||||
teams: 1,
|
teams: 1,
|
||||||
orgs: 1,
|
orgs: 1,
|
||||||
|
authenticationMethod: 1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue