aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/org/org.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-10-08 17:51:09 +0800
committerGitHub <noreply@github.com>2024-10-08 12:51:09 +0300
commitd6d3c96e6555fc91b3e2ef21f4d8d7475564bb3e (patch)
tree710dd914452b0c11b39aa6cbc9f431302af0b1f9 /routers/api/v1/org/org.go
parentd3ada91ea41b2f2eb58d637ab4c0a2dde07f20ce (diff)
downloadgitea-d6d3c96e6555fc91b3e2ef21f4d8d7475564bb3e.tar.gz
gitea-d6d3c96e6555fc91b3e2ef21f4d8d7475564bb3e.zip
Fix bug when a token is given public only (#32204)
Diffstat (limited to 'routers/api/v1/org/org.go')
-rw-r--r--routers/api/v1/org/org.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go
index e848d95181..9e58746272 100644
--- a/routers/api/v1/org/org.go
+++ b/routers/api/v1/org/org.go
@@ -191,7 +191,7 @@ func GetAll(ctx *context.APIContext) {
// "$ref": "#/responses/OrganizationList"
vMode := []api.VisibleType{api.VisibleTypePublic}
- if ctx.IsSigned {
+ if ctx.IsSigned && !ctx.PublicOnly {
vMode = append(vMode, api.VisibleTypeLimited)
if ctx.Doer.IsAdmin {
vMode = append(vMode, api.VisibleTypePrivate)