Hide password change form for SSO accounts when cp password disabled

This commit is contained in:
yflory 2023-11-08 16:15:54 +01:00
parent 72cb827e18
commit 1b032a06de
2 changed files with 3 additions and 1 deletions

View File

@ -662,6 +662,7 @@ define([
create['change-password'] = function() {
if (!common.isLoggedIn()) { return; }
if (privateData.isSSO && ApiConfig.sso && ApiConfig.sso.password === 0) { return; }
var $div = $('<div>', { 'class': 'cp-settings-change-password cp-sidebarlayout-element' });

View File

@ -150,8 +150,9 @@ define([
category = window.location.hash.slice(1);
window.location.hash = '';
}
var addData = function (obj) {
var addData = function (obj, Cryptpad, user, Utils) {
if (category) { obj.category = category; }
obj.isSSO = Boolean(Utils.LocalStore.getSSOSeed());
};
SFCommonO.start({
noRealtime: true,