Skip to content

Commit d0817a2

Browse files
committed
fix bug go-gitea#16785 and similar
1 parent 968225e commit d0817a2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

routers/api/v1/admin/org.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ func GetAllOrgs(ctx *context.APIContext) {
105105
listOptions := utils.GetListOptions(ctx)
106106

107107
users, maxResults, err := models.SearchUsers(&models.SearchUserOptions{
108+
Actor: ctx.User,
108109
Type: models.UserTypeOrganization,
109110
OrderBy: models.SearchOrderByAlphabetically,
110111
ListOptions: listOptions,

routers/api/v1/org/org.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ func GetAll(ctx *context.APIContext) {
128128
listOptions := utils.GetListOptions(ctx)
129129

130130
publicOrgs, maxResults, err := models.SearchUsers(&models.SearchUserOptions{
131+
Actor: ctx.User,
131132
ListOptions: listOptions,
132133
Type: models.UserTypeOrganization,
133134
OrderBy: models.SearchOrderByAlphabetically,

0 commit comments

Comments
 (0)