diff options
author | Peter Smit <peter@smitmail.eu> | 2015-02-05 15:29:08 +0200 |
---|---|---|
committer | Peter Smit <peter@smitmail.eu> | 2015-02-06 13:18:11 +0200 |
commit | 4e79adf6b5bf7ec7bc3b2b47469baafd1cb0b774 (patch) | |
tree | 7c9ffe3d741408b5b3c33974b5143b9a50646e02 /routers/api/v1 | |
parent | 03af37554e34582e8c5a9d98ec9f2d3c9884f0d8 (diff) | |
download | gitea-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.go | 2 |
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) { |