summaryrefslogtreecommitdiffstats
path: root/routers/api/v1
diff options
context:
space:
mode:
authorPeter Smit <peter@smitmail.eu>2015-02-05 15:29:08 +0200
committerPeter Smit <peter@smitmail.eu>2015-02-06 13:18:11 +0200
commit4e79adf6b5bf7ec7bc3b2b47469baafd1cb0b774 (patch)
tree7c9ffe3d741408b5b3c33974b5143b9a50646e02 /routers/api/v1
parent03af37554e34582e8c5a9d98ec9f2d3c9884f0d8 (diff)
downloadgitea-4e79adf6b5bf7ec7bc3b2b47469baafd1cb0b774.tar.gz
gitea-4e79adf6b5bf7ec7bc3b2b47469baafd1cb0b774.zip
Refactoring of the Access Table
This commit does a lot of the work of refactoring the access table in a table with id's instead of strings. The result does compile, but has not been tested. It may eat your kittens.
Diffstat (limited to 'routers/api/v1')
-rw-r--r--routers/api/v1/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo.go b/routers/api/v1/repo.go
index 469e4808fe..78c9f9a6a3 100644
--- a/routers/api/v1/repo.go
+++ b/routers/api/v1/repo.go
@@ -255,7 +255,7 @@ func ListMyRepos(ctx *middleware.Context) {
return
}
- repos[i] = ToApiRepository(repo.Owner, repo, api.Permission{false, access >= models.WRITABLE, true})
+ repos[i] = ToApiRepository(repo.Owner, repo, api.Permission{false, access >= models.WriteAccess, true})
// FIXME: cache result to reduce DB query?
if repo.Owner.IsOrganization() && repo.Owner.IsOwnedBy(ctx.User.Id) {