mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui: prevent infinite reload for users with krbbprincipal alias set
Web UI has inbuilt mechanism to reload in case response from a server contains a different principal than the one loaded during Web UI startup. see rpc.js:381 With kerberos aliases support the loaded principal could be different because krbprincipalname contained multiple values. In such case krbcanonicalname should be used - it contains the same principal as the one which will be in future API responses. https://fedorahosted.org/freeipa/ticket/5927 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
parent
f5eb71f75e
commit
88f7154f7f
@ -259,7 +259,11 @@ var IPA = function () {
|
||||
},
|
||||
on_success: function(data, text_status, xhr) {
|
||||
that.whoami = batch ? data.result[0] : data.result.result[0];
|
||||
that.principal = that.whoami.krbprincipalname[0];
|
||||
var cn = that.whoami.krbcanonicalname;
|
||||
if (cn) that.principal = cn[0];
|
||||
if (!that.principal) {
|
||||
that.principal = that.whoami.krbprincipalname[0];
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user