No way to get current user 'active' state and other settings via API #6375

Closed
opened 2025-11-02 06:54:01 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @WilixLead on GitHub (Nov 23, 2020).

Originally assigned to: @6543 on GitHub.

  • Gitea version (or commit ref): 1.12.6 (release)
  • Git version: 2.25.1
  • Operating system: Linux 5.4.0-48-generic x86_64
  • I get Gitea binnary from releases in Github
  • Run gitea from systemd (used config from gitea docs)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (need admin rights)
  • Log gist: --

Description

I can't find any way for admin api to get user state like 'active', 'prohibit_login' and other checkboxes in admin page.
I thing it should be under /admin/users/{username} or /users/{username} (but it require additional role checking and changing output model)

Screenshots

Originally created by @WilixLead on GitHub (Nov 23, 2020). Originally assigned to: @6543 on GitHub. - Gitea version (or commit ref): 1.12.6 (release) - Git version: 2.25.1 - Operating system: Linux 5.4.0-48-generic x86_64 - I get Gitea binnary from releases in Github - Run gitea from systemd (used config from gitea docs) - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No (need admin rights) - Log gist: -- ## Description I can't find any way for admin api to get user state like 'active', 'prohibit_login' and other checkboxes in admin page. I thing it should be under /admin/users/{username} or /users/{username} (but it require additional role checking and changing output model) ## Screenshots
GiteaMirror added the type/proposalmodifies/api labels 2025-11-02 06:54:01 -06:00
Author
Owner

@6543 commented on GitHub (Nov 23, 2020):

I think we can ad something like type to specify if it's a "normal" user or a "restricted" one ... (this way we can extend it to "bot", ...)

and 'active', 'prohibit_login' should just be exposed like is_admin ...

@6543 commented on GitHub (Nov 23, 2020): I think we can ad something like `type` to specify if it's a "normal" user or a "restricted" one ... (this way we can extend it to "bot", ...) and 'active', 'prohibit_login' should just be exposed like is_admin ...
Author
Owner

@6543 commented on GitHub (Jun 16, 2021):

restricted, active, prohibit_login are already exposed for admin & user itself ...

a "type" field is useless for now ...

-> #15689

@6543 commented on GitHub (Jun 16, 2021): `restricted`, `active`, `prohibit_login` are already exposed for admin & user itself ... a "type" field is useless for now ... -> #15689
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6375