mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 17:20:53 +02:00
Merge remote-tracking branch 'upstream/main' into limit-repo-size
This commit is contained in:
703 files changed
+6340
-3735
No files matched your search
@@ -77,9 +77,10 @@ func parseScope(ctx *context.PrivateContext, scope string) (ownerID, repoID int6
|
||||
if err != nil {
|
||||
return ownerID, repoID, err
|
||||
}
|
||||
ownerID = u.ID
|
||||
|
||||
if !found {
|
||||
return u.ID, repoID, nil
|
||||
return ownerID, repoID, nil
|
||||
}
|
||||
|
||||
r, err := repo_model.GetRepositoryByName(u.ID, repoName)
|
||||
|
||||
@@ -61,7 +61,7 @@ func (ctx *preReceiveContext) CanWriteCode() bool {
|
||||
if !ctx.loadPusherAndPermission() {
|
||||
return false
|
||||
}
|
||||
ctx.canWriteCode = issues_model.CanMaintainerWriteToBranch(ctx.userPerm, ctx.branchName, ctx.user) || ctx.deployKeyAccessMode >= perm_model.AccessModeWrite
|
||||
ctx.canWriteCode = issues_model.CanMaintainerWriteToBranch(ctx, ctx.userPerm, ctx.branchName, ctx.user) || ctx.deployKeyAccessMode >= perm_model.AccessModeWrite
|
||||
ctx.checkedCanWriteCode = true
|
||||
}
|
||||
return ctx.canWriteCode
|
||||
|
||||
Reference in new issue
Block a user