Return all repositories in user repos API endpoint for Gitea administrators #5558

Closed
opened 2025-11-02 06:28:53 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @lafriks on GitHub (Jun 16, 2020).

Currently there is no way for Gitea server administrator to see or access repositories in drone, only where he is directly added in organization even he can access them from Gitea web interface. This makes it very hard to administer drone with large number of repositories.

Originally created by @lafriks on GitHub (Jun 16, 2020). Currently there is no way for Gitea server administrator to see or access repositories in drone, only where he is directly added in organization even he can access them from Gitea web interface. This makes it very hard to administer drone with large number of repositories.
GiteaMirror added the type/proposal label 2025-11-02 06:28:53 -06:00
Author
Owner

@mrsdizzie commented on GitHub (Jun 16, 2020):

http://example.com/admin/repos shows all repos for server admin in Gitea Web interface:

6a4de37f7e/routers/admin/repos.go (L22-L32)

Should be possible to refactor that so you could then have the API return just the repos list and not the entire template

@mrsdizzie commented on GitHub (Jun 16, 2020): http://example.com/admin/repos shows all repos for server admin in Gitea Web interface: https://github.com/go-gitea/gitea/blob/6a4de37f7e790716c35f1dc4a0aeacfe4b4a1415/routers/admin/repos.go#L22-L32 Should be possible to refactor that so you could then have the API return just the repos list and not the entire template
Author
Owner

@CirnoT commented on GitHub (Jun 16, 2020):

Drone uses same logic as collaboration, hence why.

This is very dangerous procedure; enabling repository via admin account will mark you as repository owner within Drone database!

@CirnoT commented on GitHub (Jun 16, 2020): Drone uses same logic as collaboration, hence why. This is very dangerous procedure; enabling repository via admin account will mark you as repository owner within Drone database!
Author
Owner

@CirnoT commented on GitHub (Jun 16, 2020):

Also note that Gitea is not Drone; doing this would affect all Drone instances, even those owned by user and not under control of same person as Gitea admin! This will leak data about ALL Gitea repositories to them by creating entry for repository name and their owner in Drone's database.

@CirnoT commented on GitHub (Jun 16, 2020): Also note that Gitea is not Drone; doing this would affect all Drone instances, even those owned by user and not under control of same person as Gitea admin! **This will leak data about ALL Gitea repositories to them by creating entry for repository name and their owner in Drone's database.**
Author
Owner

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

we can create a new api endpoint similar to https://try.gitea.io/api/swagger#/admin/adminGetAllUsers

@6543 commented on GitHub (Jun 16, 2020): we can create a new api endpoint similar to https://try.gitea.io/api/swagger#/admin/adminGetAllUsers
Author
Owner

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

GET /admin/repos

@6543 commented on GitHub (Jun 16, 2020): `GET /admin/repos`
Author
Owner

@lafriks commented on GitHub (Jun 17, 2020):

As per discussion in Discord with @CirnoT it should most probably be implemented in Drone side.

Other option could be to have this as setting (disabled by default) when Gitea is used as private instance with single gitea and drone instances.

@lafriks commented on GitHub (Jun 17, 2020): As per discussion in Discord with @CirnoT it should most probably be implemented in Drone side. Other option could be to have this as setting (disabled by default) when Gitea is used as private instance with single gitea and drone instances.
Author
Owner

@6543 commented on GitHub (Jun 17, 2020):

I would never return all repos via USER Repo API but in generel it would be a good feature for an Admin api endpoint - will create a pull

and yes this has nothing to do with the main issue witch should be implemented by drone

@6543 commented on GitHub (Jun 17, 2020): I would never return all repos via **USER Repo** API but in generel it would be a good feature for an Admin api endpoint - will create a pull and yes this has nothing to do with the main issue witch should be implemented by drone
Author
Owner

@CirnoT commented on GitHub (Jun 17, 2020):

I agree, would be nice if Drone could allow admin user to view all repos that are currently in its database.

@CirnoT commented on GitHub (Jun 17, 2020): I agree, would be nice if Drone could allow admin user to view all repos that are currently in its database.
Author
Owner

@lafriks commented on GitHub (Jul 1, 2020):

Closing this as my use-case has been covered by drone/drone-ui#334

@lafriks commented on GitHub (Jul 1, 2020): Closing this as my use-case has been covered by drone/drone-ui#334
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5558