Updating context and fixing permission issues

The boolean flags in the repo context have been replaced with mode and two methods

Also, the permissions have been brought more in line with https://help.github.com/articles/permission-levels-for-an-organization-repository/ , Admin Team members are able to change settings of their repositories.
This commit is contained in:
Peter Smit 2015-02-16 12:51:56 +02:00
parent cd6a2b78a7
commit ed89b39984
10 changed files with 68 additions and 72 deletions

View file

@ -12,7 +12,7 @@ import (
)
func GetRepoRawFile(ctx *middleware.Context) {
if ctx.Repo.Repository.IsPrivate && !ctx.Repo.HasAccess {
if !ctx.Repo.HasAccess() {
ctx.Error(404)
return
}