mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-26 13:29:12 -05:00
Allow authors to use act keywords in PR content (#9059)
This commit is contained in:
parent
b15f26b1cf
commit
64769c8a6b
1 changed files with 6 additions and 1 deletions
|
@ -178,9 +178,14 @@ func (issue *Issue) verifyReferencedIssue(e Engine, ctx *crossReferencesContext,
|
|||
if !perm.CanReadIssuesOrPulls(refIssue.IsPull) {
|
||||
return nil, references.XRefActionNone, nil
|
||||
}
|
||||
// Accept close/reopening actions only if the poster is able to close the
|
||||
// referenced issue manually at this moment. The only exception is
|
||||
// the poster of a new PR referencing an issue on the same repo: then the merger
|
||||
// should be responsible for checking whether the reference should resolve.
|
||||
if ref.Action != references.XRefActionNone &&
|
||||
ctx.Doer.ID != refIssue.PosterID &&
|
||||
!perm.CanWriteIssuesOrPulls(refIssue.IsPull) {
|
||||
!perm.CanWriteIssuesOrPulls(refIssue.IsPull) &&
|
||||
(refIssue.RepoID != ctx.OrigIssue.RepoID || ctx.OrigComment != nil) {
|
||||
refAction = references.XRefActionNone
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue