summaryrefslogtreecommitdiffstats
path: root/routers/admin
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-01-12 16:43:44 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2020-01-12 23:43:44 +0800
commit10055bd2b1d18d3ccbec78cbc213e459ddb75804 (patch)
tree0c3aacafab3f852a0509c4dcd2055aa93e36c0c3 /routers/admin
parent497e15fdc28518ab03e2f1114fb112b8c0630e18 (diff)
downloadgitea-10055bd2b1d18d3ccbec78cbc213e459ddb75804.tar.gz
gitea-10055bd2b1d18d3ccbec78cbc213e459ddb75804.zip
[API] add GET /orgs endpoint (#9560)
* introduce `GET /orgs` * add TEST * show also other VisibleType's * update description * refactor a lot * SearchUserOptions by default return only public
Diffstat (limited to 'routers/admin')
-rw-r--r--routers/admin/orgs.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/admin/orgs.go b/routers/admin/orgs.go
index e0be99872e..02068d6185 100644
--- a/routers/admin/orgs.go
+++ b/routers/admin/orgs.go
@@ -9,6 +9,7 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers"
)
@@ -25,6 +26,6 @@ func Organizations(ctx *context.Context) {
routers.RenderUserSearch(ctx, &models.SearchUserOptions{
Type: models.UserTypeOrganization,
PageSize: setting.UI.Admin.OrgPagingNum,
- Private: true,
+ Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate},
}, tplOrgs)
}