1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-05 18:05:19 +02:00

add submodule basic support & buf fixed #478

This commit is contained in:
lunnyxiao 2014-09-22 10:43:16 +08:00
parent 7ba9257a7f
commit 150eef93b2
7 changed files with 115 additions and 9 deletions

View file

@ -103,6 +103,7 @@ func Http(ctx *middleware.Context) {
// check access
if askAuth {
baHead := ctx.Req.Header.Get("Authorization")
fmt.Println("auth:", baHead)
if baHead == "" {
authRequired(ctx)
return
@ -121,6 +122,8 @@ func Http(ctx *middleware.Context) {
return
}
fmt.Println("auth2:", authUsername, passwd)
authUser, err = models.GetUserByName(authUsername)
if err != nil {
ctx.Handle(401, "no basic auth and digit auth", nil)
@ -134,6 +137,8 @@ func Http(ctx *middleware.Context) {
return
}
fmt.Println("passwd is right")
if !isPublicPull {
var tp = models.WRITABLE
if isPull {