1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-18 16:28:36 +00:00

List limited and private orgs if authenticated on API (#16866) (#16879)

This commit is contained in:
6543
2021-08-31 12:49:02 +02:00
committed by GitHub
parent af1fd56d8a
commit 3ac1f35349
3 changed files with 4 additions and 4 deletions

View File

@@ -106,6 +106,7 @@ func GetAllOrgs(ctx *context.APIContext) {
listOptions := utils.GetListOptions(ctx)
users, maxResults, err := models.SearchUsers(&models.SearchUserOptions{
Actor: ctx.User,
Type: models.UserTypeOrganization,
OrderBy: models.SearchOrderByAlphabetically,
ListOptions: listOptions,