diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2017-05-18 11:28:29 -0300 |
---|---|---|
committer | Andrey Nering <andrey.nering@gmail.com> | 2017-05-18 11:28:29 -0300 |
commit | dc2b28ed769c234def22050e5f2a487b60c697af (patch) | |
tree | e1f8c3a18a91a1a4da6c606bcb962a69b3ff82de /routers | |
parent | c746875fcfc91b61082d1bae58cba7e1fef9eb91 (diff) | |
download | gitea-dc2b28ed769c234def22050e5f2a487b60c697af.tar.gz gitea-dc2b28ed769c234def22050e5f2a487b60c697af.zip |
Show repos acording to user/organization
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/repo/repo.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 2c01352fcf..c299b969bc 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -32,7 +32,9 @@ func Search(ctx *context.APIContext) { Keyword: strings.Trim(ctx.Query("q"), " "), OwnerID: ctx.QueryInt64("uid"), PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")), - Searcher: ctx.User, + } + if ctx.User.ID == opts.OwnerID { + opts.Searcher = ctx.User } // Check visibility. |