mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Small refactoring of modules/private (#15947)
* Use correct variable name. * doer is never nil here. * Use status code constants. * Replaced generic map with concrete struct. * Fixed windows lint. * Removed unused method. * Changed error codes. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
@@ -1461,7 +1461,7 @@ func ViewIssue(ctx *context.Context) {
|
||||
}
|
||||
if perm.CanWrite(models.UnitTypeCode) {
|
||||
// Check if branch is not protected
|
||||
if protected, err := pull.HeadRepo.IsProtectedBranch(pull.HeadBranch, ctx.User); err != nil {
|
||||
if protected, err := pull.HeadRepo.IsProtectedBranch(pull.HeadBranch); err != nil {
|
||||
log.Error("IsProtectedBranch: %v", err)
|
||||
} else if !protected {
|
||||
canDelete = true
|
||||
|
Reference in New Issue
Block a user