mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-07-13 07:00:04 +02:00
Merge branch 'master' of github.com:gogits/gogs
Conflicts: models/update.go routers/repo/http.go
This commit is contained in:
commit
86e2627175
75 changed files with 2034 additions and 661 deletions
|
@ -107,9 +107,9 @@ func Http(ctx *middleware.Context, params martini.Params) {
|
|||
}
|
||||
|
||||
if !isPublicPull {
|
||||
var tp = models.AU_WRITABLE
|
||||
var tp = models.WRITABLE
|
||||
if isPull {
|
||||
tp = models.AU_READABLE
|
||||
tp = models.READABLE
|
||||
}
|
||||
|
||||
has, err := models.HasAccess(authUsername, username+"/"+reponame, tp)
|
||||
|
@ -117,8 +117,8 @@ func Http(ctx *middleware.Context, params martini.Params) {
|
|||
ctx.Handle(401, "no basic auth and digit auth", nil)
|
||||
return
|
||||
} else if !has {
|
||||
if tp == models.AU_READABLE {
|
||||
has, err = models.HasAccess(authUsername, username+"/"+reponame, models.AU_WRITABLE)
|
||||
if tp == models.READABLE {
|
||||
has, err = models.HasAccess(authUsername, username+"/"+reponame, models.WRITABLE)
|
||||
if err != nil || !has {
|
||||
ctx.Handle(401, "no basic auth and digit auth", nil)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue