mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 20:59:29 +02:00
fix(repo): centralize repository-scoped authorization (#39063)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
90c43e8e78
commit
e21c37703e
27 files changed
+383
-476
No files matched your search
@@ -19,7 +19,7 @@ func ChangeContent(ctx context.Context, issue *issues_model.Issue, doer *user_mo
|
||||
}
|
||||
|
||||
if user_model.IsUserBlockedBy(ctx, doer, issue.PosterID, issue.Repo.OwnerID) {
|
||||
if isAdmin, _ := access_model.IsUserRepoAdmin(ctx, issue.Repo, doer); !isAdmin {
|
||||
if !access_model.IsUserRepoAdmin(ctx, issue.Repo, doer) {
|
||||
return user_model.ErrBlockedUser
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user