mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04: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'){
|
||||
query.$and[2].$or.push({'members.userId': Meteor.userId()});
|
||||
|
||||
if(allowPrivateVisibilityOnly !== undefined && allowPrivateVisibilityOnly.booleanValue){
|
||||
query.$and.push({'permission': 'private'});
|
||||
}
|
||||
|
|
|
@ -49,10 +49,11 @@ template(name="memberMenuPopup")
|
|||
i.fa.fa-lock
|
||||
| {{_ 'admin-panel'}}
|
||||
hr
|
||||
li
|
||||
a.js-edit-profile
|
||||
i.fa.fa-user
|
||||
| {{_ 'edit-profile'}}
|
||||
if isNotOAuth2AuthenticationMethod
|
||||
li
|
||||
a.js-edit-profile
|
||||
i.fa.fa-user
|
||||
| {{_ 'edit-profile'}}
|
||||
li
|
||||
a.js-change-settings
|
||||
i.fa.fa-cog
|
||||
|
@ -62,10 +63,11 @@ template(name="memberMenuPopup")
|
|||
i.fa.fa-picture-o
|
||||
| {{_ 'edit-avatar'}}
|
||||
unless isSandstorm
|
||||
li
|
||||
a.js-change-password
|
||||
i.fa.fa-key
|
||||
| {{_ 'changePasswordPopup-title'}}
|
||||
if isNotOAuth2AuthenticationMethod
|
||||
li
|
||||
a.js-change-password
|
||||
i.fa.fa-key
|
||||
| {{_ 'changePasswordPopup-title'}}
|
||||
li
|
||||
a.js-change-language
|
||||
i.fa.fa-flag
|
||||
|
|
|
@ -22,6 +22,14 @@ Template.memberMenuPopup.helpers({
|
|||
return false;
|
||||
}
|
||||
},
|
||||
isNotOAuth2AuthenticationMethod(){
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
return currentUser.authenticationMethod != 'OAuth2';
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Template.memberMenuPopup.events({
|
||||
|
|
|
@ -445,6 +445,7 @@ Users.safeFields = {
|
|||
'profile.initials': 1,
|
||||
orgs: 1,
|
||||
teams: 1,
|
||||
authenticationMethod: 1,
|
||||
};
|
||||
|
||||
if (Meteor.isClient) {
|
||||
|
|
|
@ -25,6 +25,7 @@ Meteor.publish('user-admin', function() {
|
|||
isAdmin: 1,
|
||||
teams: 1,
|
||||
orgs: 1,
|
||||
authenticationMethod: 1,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue