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

[Proposal] New admin API Routes #4387

Closed
cleverer opened this issue Jul 6, 2018 · 7 comments
Closed

[Proposal] New admin API Routes #4387

cleverer opened this issue Jul 6, 2018 · 7 comments
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@cleverer
Copy link
Contributor

cleverer commented Jul 6, 2018

In order to delete a user via the API, he mustn't be part of any organisation. Right now it's not possible to get all orgs of an user. I propose a new Route GET /api/v1/admin/users/:username/orgs. The route already exists, but without the admin, so it only returns public memberships. I think, as admin you should be able to see those.

Another solution would be a listing of all orgs (GET /api/v1/admin/orgs). The user then could be tested for org membership for all orgs.

A third route which is missing for me is GET /api/v1/admin/users, which would be essential for user syncing.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jul 6, 2018
@jonasfranz jonasfranz added the modifies/api This PR adds API routes or modifies them label Jul 6, 2018
@shashvat-kedia
Copy link
Contributor

shashvat-kedia commented Nov 27, 2018

@lunny @cleverer Can I work on this? I am new to this project could you help me get started? Thanks

@cleverer
Copy link
Contributor Author

@lunny @cleverer Can I work on this? I am new to this project could you help me get started? Thanks

@SD1998 I'd love to help, but unfortunately I don't know more than you...

@lunny
Copy link
Member

lunny commented Nov 27, 2018

@SD1998 You are welcome. You can find codes about GET /api/v1/users/:username/orgs as an example.

@shashvat-kedia
Copy link
Contributor

shashvat-kedia commented Dec 2, 2018

@lunny One doubt, so the admin should be able to fetch only the public memberships or both public and private? Thanks.

@lunny
Copy link
Member

lunny commented Dec 3, 2018

The /api/v1/admin APIs is for site administrator. I think it could do anything for management convenience.

@zeripath
Copy link
Contributor

Heya! Have you considered using the Sudo API feature to get this information? That way you can do this in Gitea 1.6.0 without waiting for these new APIs.

A lot of deficiencies with the API can simply be workarounded using Sudo.

@6543
Copy link
Member

6543 commented Sep 17, 2020

close this, as zeripath pointed to sudo option ...

If a specific api is needed, just as for that specific in a new issue

@6543 6543 closed this as completed Sep 17, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them 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

6 participants