WebUI: check principals in lowercase

WebUI checks whether principal name of logged user and principal name
in each command is equal. As KDC for our principals is case insensitive
- it does make sense to switch this check also into case insensitive.
So both principals are reformated to lower case and then
compared.

Part of: https://pagure.io/freeipa/issue/3242

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Pavel Vomacka authored and Martin Babinsky committed 2017-03-27 08:55:41 +02:00
1 parent 2612c092dd
commit 1dcdcd12f4
1 file changed
+2 -1
+2 -1
View File
@@ -389,7 +389,8 @@ rpc.command = function(spec) {
} else if (IPA.version && data.version && IPA.version !== data.version) {
window.location.reload();
} else if (IPA.principal && data.principal && IPA.principal !== data.principal) {
} else if (IPA.principal && data.principal &&
IPA.principal.toLowerCase() !== data.principal.toLowerCase()) {
window.location.reload();
} else if (data.error) {