DMPRoadmap / roadmap

DCC/UC3 collaboration for a data management planning tool
MIT License
102 stars 109 forks source link

Changing my Org when I have admin privileges throws nasty error msg #1060

Closed stephaniesimms closed 6 years ago

stephaniesimms commented 6 years ago

When I clicked the x to remove my org affiliation under Edit Profile, then entered my pw in the popup to confirm my changes, I received a nasty error message (screenshot below). When I returned to my profile page the changes were saved successfully (i.e., Org field was blank). I got the same error message when I attempted to change my email address and clicked Save. And now I get the error when i try to change and Save any profile info for this account.

We should replace the nasty error with something nicer in the banner at the top of the page or a modal that notifies admin users of the implications of changing their org and/or email:

Note: If you remove or change your organisational affiliation or email address you will lose any administrative privileges associated with this account. Are you sure you want to take this action?

pw-update-profile-no-org

briri commented 6 years ago

I can't replicate this issue on roadmap-stg @stephaniesimms

The system only asks for your password when you change your email address. I tried a few combinations of removing my org affiliation and changing my email to get the password popup but everything works ok.

If I remove the org affiliation and do not enter something in the other org box I get: "Error: Save Unsuccessful. Please select an organisation from the list, or enter your organisation's name."

stephaniesimms commented 6 years ago

i'll test some more on Mon @briri - don't waste any more time on it now if you can't replicate

stephaniesimms commented 6 years ago

I tested again and get the error message each time. It appears when I try to change any info for this account stephanie.simms@gmail.com - I also noticed that the account no longer appears in the full list of User accounts when I login as a Super Admin. I updated the original issue above @briri

Steps to repeat:

  1. user w/Org admin privileges changes email address in Edit profile page
  2. clicks save
  3. enters pw into modal and clicks Continue
  4. then comes the nasty error message
stephaniesimms commented 6 years ago

the behavior is much nicer now. if i try to change my email address as an Org Admin the system prevents me from doing it. we should revise the Error message (screenshot) to give clearer instructions about why this is:

"Error: Save unsuccessful. You must remove/change your Organizational affiliation to remove your administrator privileges. Only then you will be able to change your email address."

I can easily remove my admin privileges by changing my Org. We should also add a tooltip to prevent admins from accidentally doing this. @sjDCC thoughts and suggestions about messaging here?

screen shot 2018-02-26 at 2 49 09 pm

sjDCC commented 6 years ago

I've just done some testing and could change my email address as both org admin and super admin so I guess this isn't working as expected. I didn't get the warning of why I couldn't change, though no horrible red warning errors either which is good. capture

In terms of a notice to prevent org admins inadvertently losing permissions how about a popup when they try to change org saying:

"Are you sure you want to change your organisational affiliation? Doing so will remove your administrative privileges."

This should only appear for org admins not super admins. Changing org as a super admin shouldn't affect any privileges.

stephaniesimms commented 6 years ago

the modal with confirmation checkbox looks good @briri and i think it should prevent users from accidentally removing their privileges.

now maybe i'm confused about correct behavior. i can change my email address without affecting other things (admin privileges, org affiliation) which actually makes sense to me. the email address only matters for shibbolized accounts and in dmptool we disabled users' ability to change email for these accounts. i may have mixed up the original source of the error when i reported this issue - changing my email and changing my org. things seem to be working as expected now. will close and wait for @sjDCC to confirm.

change-org