Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enterprise->Users] Main owner can remove themselves as manager #10209

Open
audez opened this issue Dec 26, 2022 · 1 comment
Open

[Enterprise->Users] Main owner can remove themselves as manager #10209

audez opened this issue Dec 26, 2022 · 1 comment

Comments

@audez
Copy link
Collaborator

audez commented Dec 26, 2022

Description

The main owner of an enterprise can remove themselves as a manager: after deleting their own email, an error 401 "unauthorized" is triggered but the owner is still removed, and loose access to the admin dashboard.

Expected Behavior

If it's allowed to remove oneself as manager, there shouldn't be an error.
If it's not allowed to remove oneself as manager, the trash icon shouldn't be activated.

Steps to Reproduce

  1. Create an enterprise with a new account
  2. In Enterprises> Users, add another mail in the fields: Managers, Notifications, and Owner
  3. See that the trash to delete the initial account is activated
  4. Click on the trash then click "Update"
  5. See the error: GET | https://staging.coopcircuits.fr/unauthorized -- 401 Unauthorized
  6. See that you can't access the admin dashboard anymore

Animated Gif/Screenshot

Enregistrement de l’écran 2022-12-26 à 20 17 03

Severity

bug-s3: a feature is broken but there is a workaround

@RachL
Copy link
Contributor

RachL commented Dec 27, 2022

I think the correct behavior here must be to change the owner first. The downside is that currently only the owner can remove users. What do you think @openfoodfoundation/train-drivers-product-owners ?

@sigmundpetersen sigmundpetersen changed the title [Enterprise users] Main owner can remove themselves as manager [Enterprise->Users] Main owner can remove themselves as manager Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: All the things
Development

No branches or pull requests

2 participants