Global configuration to prevent users from deleting their own account #723

Closed
opened 2025-11-02 03:34:09 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @ghost on GitHub (May 19, 2017).

  • Gitea version (or commit ref):25d6e2a
  • Git version:2.11.2
  • Operating system:ubuntu/docker
  • 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

There should be a default admin level configuration to prevent users from deleting their own account.

This has currently led to an issue on our installation, wherein, we use only the SMTP login source.
A user logs in once, admin sets their repo limit to 0.
The user deletes their account and signs back in, this is making the repo setting go back to -1 (unlimited)

This is just one problem.
We do not want any of the users of our ORG to have the ability to delete their own accounts for multiple other reasons as well.

Originally created by @ghost on GitHub (May 19, 2017). - Gitea version (or commit ref):25d6e2a - Git version:2.11.2 - Operating system:ubuntu/docker - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description There should be a default admin level configuration to prevent users from deleting their own account. This has currently led to an issue on our installation, wherein, we use only the SMTP login source. A user logs in once, admin sets their repo limit to 0. The user deletes their account and signs back in, this is making the repo setting go back to -1 (unlimited) This is just one problem. We do not want any of the users of our ORG to have the ability to delete their own accounts for multiple other reasons as well.
GiteaMirror added the type/featuretype/proposal labels 2025-11-02 03:34:09 -06:00
Author
Owner

@DblK commented on GitHub (May 19, 2017):

I will try to work on it.
But first, I have some questions:

  1. Should it be linked to the authentification Source (Ex with LDAP EDIT)

image

  1. Or more simply add to the user modification page (in admin mode) with default value to prevent deletion

image

  1. Somewhere else?
@DblK commented on GitHub (May 19, 2017): I will try to work on it. But first, I have some questions: 1) Should it be linked to the authentification Source (Ex with LDAP EDIT) ![image](https://cloud.githubusercontent.com/assets/832617/26243188/41e857fa-3c8b-11e7-9bf3-9f39adaa9830.png) 2) Or more simply add to the user modification page (in admin mode) with default value to prevent deletion ![image](https://cloud.githubusercontent.com/assets/832617/26243169/320ecb84-3c8b-11e7-97da-a43df2b53c97.png) 3) Somewhere else?
Author
Owner

@ghost commented on GitHub (May 19, 2017):

My vote is for Approach 1

I would also like to suggest Approach 3, have a global variable in app.ini, so that it would apply to every source and prevent account deletion altogether.

Also, IMO, the administrator should have absolute authority over this and hence we should avoid placing any UI configurable element.

@ghost commented on GitHub (May 19, 2017): My vote is for Approach 1 I would also like to suggest Approach 3, have a global variable in app.ini, so that it would apply to every source and prevent account deletion altogether. Also, IMO, the administrator should have absolute authority over this and hence we should avoid placing any UI configurable element.
Author
Owner

@DblK commented on GitHub (May 19, 2017):

I will wait for comments from other members to see which implementation should be done.
The approach 3 sounds good too.

@DblK commented on GitHub (May 19, 2017): I will wait for comments from other members to see which implementation should be done. The approach 3 sounds good too.
Author
Owner

@lunny commented on GitHub (May 19, 2017):

Maybe a global option to disable_user_suicide

@lunny commented on GitHub (May 19, 2017): Maybe a global option to disable_user_suicide
Author
Owner

@DblK commented on GitHub (May 19, 2017):

When you said global option, you mean inside conf.ini?

@DblK commented on GitHub (May 19, 2017): When you said global option, you mean inside conf.ini?
Author
Owner

@ghost commented on GitHub (May 19, 2017):

I'm currently using the app.ini file to define gobal configuration variables.

@ghost commented on GitHub (May 19, 2017): I'm currently using the app.ini file to define gobal configuration variables.
Author
Owner

@lunny commented on GitHub (May 20, 2017):

@DblK yes

@lunny commented on GitHub (May 20, 2017): @DblK yes
Author
Owner

@lunny commented on GitHub (Jun 20, 2023):

should be resolved by #20549

@lunny commented on GitHub (Jun 20, 2023): should be resolved by #20549
Author
Owner

@lunny commented on GitHub (Feb 27, 2024):

Fixed by #29275

@lunny commented on GitHub (Feb 27, 2024): Fixed by #29275
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#723