citrit / iMapInvasiveSpeciesApp

iMap invasive species app for field entry. iMapInvasives provides an on-line, GIS-based data management system to assist citizen scientists and natural resource managers working to protect natural resources from the threat of invasive species.
3 stars 0 forks source link

Wrong password or user name error #21

Closed btkinal closed 9 years ago

btkinal commented 9 years ago

This may have to wait until a later version but if a user enters the wrong user name or password they do not find out until the submit a record and it gets bounced back. Right now they get a nondescript error message (see attached). At this point it looks like even if they do update there user name and password that any record entered prior to that already contains the user name an password that were entered at the time the observation was created. It seems that the only way to update this in the observation is to open the obs via the edit button and re-save the observation.

First I was wondering if there is any way we can validate the username and password when they save their preferences?

If this is not possible can the attaches error message be replaced with some text instructing the user that either their user name and password are incorrect and that they should update it and open and re-save each record before uploading.

Something like this: "You have submitted either an incorrect username or password. Please check and update your username and password and open (via "Edit") and save each of your observations before uploading to iMapInvasives"

screenshot_2015-03-17-13-51-25

citrit commented 9 years ago

Currently this is only the case for a bad username, the password is not used at this point.

btkinal commented 9 years ago

OK, can the error message be altered to be more meaningful to the users?

citrit commented 9 years ago

I added the catching of this error code and the message box is much cleaner. Give it a try, simply take a character off your username and upload an observation. You should see the alert with more specifics. I will coordinate more with the backend to capture more of these specific error codes.

btkinal commented 9 years ago

The error code looks good, however before when I went back and opened an observation record via "Edit" and then saved it seemed to update the username in the record, now that doesn't seem to be the case and (unless I am missing something) any observations that were entered with an incorrect username would need to be deleted and reentered.

Would there be a way to validated the user name when saving user preferences?

mrchocoborider commented 9 years ago

Records attempting to be uploaded with an incorrect username should not be making it into the database, if they are let me know and I'll look into it. It is theoretically possible to authenticate user on saving the preferences, but it would require sending an additional request to the one being sent now, to a different script that is ready to handle it. It's not really that hard but it would take some time.

Either way, the password is not being sent right now. Let me know how you want to handle sending the password along with the username and I will deal with it accordingly.