Skip to content

Ensure there is always one user with admin privileges #15449

@thopico

Description

@thopico
  • Gitea version (or commit ref): docker image gitea/gitea:1.14.0-rootless
  • Git version: 2.30.2
  • Operating system: Debian buster
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (need admin privileges)
  • Log gist:

Description

Hi, today doing a dumb test with my prod instance, I remove myself from the admin group (where I was alone).
This was not a big deal as I could get it back through cli, but it seems to me it would be better if Gitea prevents this kind of mistake.

Either it could check if at least one admin remains after removal, or it could disallow removing admin privileges to the logged in user?

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions