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

Deleting a user belonging to an organization #2120

Open
2 of 7 tasks
Tracked by #4
flakron opened this issue Jul 7, 2017 · 13 comments
Open
2 of 7 tasks
Tracked by #4

Deleting a user belonging to an organization #2120

flakron opened this issue Jul 7, 2017 · 13 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@flakron
Copy link

flakron commented Jul 7, 2017

  • Gitea version (or commit ref):1.1.2 (but also in master branch)
  • Git version:2.7.4
  • Operating system:Ubuntu 16.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When I try to delete a user, if that user is a member of an organization then the application won't delete but show an error message, which is fine. But what would be an improvement, is the possibility to show to what organizations/repositories the user is member of, in that case I wouldn't have to go hunting through all organizations to find him/her to be able to remove him/her.

A better solution would probably be to remove him (but first warn that the user belongs to the following organizations: with a list to which ones).

Screenshots

If this issue involves the Web Interface, please include a screenshot

@lunny lunny added the type/enhancement An improvement of existing functionality label Jul 7, 2017
@lunny lunny added this to the 1.x.x milestone Jul 7, 2017
@bkcsoft
Copy link
Member

bkcsoft commented Jul 7, 2017

Listing the orgas the user is in, with an option to remove the membership on all would be great 👍

The thing to note is that if you're the only owner of an Orga you can't be deleted from it 🙁

@glothriel
Copy link

glothriel commented Jul 15, 2017

What I can propose (and try to implement) is the following:
Admin clicks delete button on admin -> user details page
If deleted user has no organization, set flash message and redirect to /admin/users (just as now).
If user has organizations, redirect to a new page that will contain a list of organizations the user belongs to and a message stating that the user will be removed from all those organizations.

@bkcsoft 's note about one-user organization can be solved with removing the organization along with the user.

@lunny
Copy link
Member

lunny commented Jul 15, 2017

Since user has a settings page named organizations in v1.2 which will list all of his organizations and leave them. I think maybe it's no need other work. Any idea?

@glothriel
Copy link

You mean the user settings? Is that still helpful for an admin? Even if it is, clicking through several buttons to delete the user doesn't make a lot of sense if it can be done automatically - unless there is a technical obstacle I'm not aware of.

@lafriks
Copy link
Member

lafriks commented Jul 15, 2017

@glothriel but not allways user can be removed form the team (especially owners team if he is the only that team)

@glothriel
Copy link

Can't the whole team be removed with the last user?

@lafriks
Copy link
Member

lafriks commented Jul 15, 2017

Owners team can not be deleted

@glothriel
Copy link

Ok, here's my initial proposition (I will improve the styles to match the application better, treat it as a funcionalty mockup):

image

@lafriks
Copy link
Member

lafriks commented Jul 16, 2017

I think it show warning only where user is only owner. Also option could be added for this situation could possibly allow to specify user to whom ownership should be transfered like changing button "Trasfer ownership and delete". Also it should be modal dialog.

@glothriel
Copy link

I initially wanted to implement it in a dialog (like this one), but I couldn't find anything similiar in the code and decided to go with separate page. If you are aware of such already existing component please direct me.
Transfer ownership and delete is good, but what if the user is only member of the organization? I would not like to go into lot of edge-cases here.

@lafriks
Copy link
Member

lafriks commented Jul 16, 2017

Yes that also, of course

@lafriks
Copy link
Member

lafriks commented Jul 16, 2017

Currently there are no such dialogs but it's content could be filled using vuejs ccomponent with ajax request to get data

@stale
Copy link

stale bot commented Feb 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Feb 13, 2019
@lunny lunny added issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/proposal The new feature has not been accepted yet but needs to be discussed first. and removed issue/stale labels Feb 14, 2019
@lunny lunny removed this from the 1.x.x milestone Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

5 participants