diff options
Diffstat (limited to 'routers/api/v1/repo/repo.go')
-rw-r--r-- | routers/api/v1/repo/repo.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index a491e7ce..7ff47a2d 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -309,7 +309,11 @@ func Get(ctx *context.APIContext) { return } - ctx.JSON(200, repo.APIFormat(&api.Permission{true, true, true})) + ctx.JSON(200, repo.APIFormat(&api.Permission{ + Admin: ctx.Repo.IsAdmin(), + Push: ctx.Repo.IsWriter(), + Pull: true, + })) } // https://github.com/gogits/go-gogs-client/wiki/Repositories#delete |