summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/repo.go')
-rw-r--r--routers/api/v1/repo/repo.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index e8bf026511..305daa064d 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -42,6 +42,7 @@ func Search(ctx *context.APIContext) {
if ctx.IsSigned && opts.OwnerID > 0 {
if ctx.User.ID == opts.OwnerID {
opts.Private = true
+ opts.Collaborate = true
} else {
u, err := models.GetUserByID(opts.OwnerID)
if err != nil {
@@ -54,7 +55,10 @@ func Search(ctx *context.APIContext) {
if u.IsOrganization() && u.IsOwnedBy(ctx.User.ID) {
opts.Private = true
}
- // FIXME: how about collaborators?
+
+ if !u.IsOrganization() {
+ opts.Collaborate = true
+ }
}
}