geosolutions-it / UNMISS-GeoStory

0 stars 1 forks source link

Login as admin not possible anymore #53

Closed EddyCatt closed 1 year ago

EddyCatt commented 1 year ago

Client is having some issues in logging as administrator (see image) image

and for this reason he's not able to save maps

image

It could be related to the IP white list implemented for administrators (see https://github.com/geosolutions-it/UNMISS-GeoStory/issues/45)

giohappy commented 1 year ago

@EddyCatt as confirmed the IP the user is connecting from is outside the whitelisted range, so it's fine that it is logged in as a normal user and not as an admin.

What we will have to check is if it owns the map or not. In case it isn't the owner the error is expected, since it cannot save the map. In that case the issue is that it shouldn't even see the "Save" button. Only the "Save As", in case...

giohappy commented 1 year ago

@EddyCatt the problem is that the authentication flow we use when whitelisting is activated is apparently case-sensitive. Their usernames have capital letters, but they were authenticating with the username all lowercase. It looks like the standard Django flow is case insensitive, so when whitelisting is not activated they can log in.

During the Zoom session, I explained the issue. They asked to change their username to lowercase for simplicity. We will check if we can improve this (making the authentication case insensitive also with whitelisting) but I would put it as low priority since they have a solution now.