mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-12 19:50:51 +00:00
Backport #36916 This PR fixes a bug in the UI that prevented non-collaborator users (the issue poster or creator) from setting the target branch (ref) of an issue. The backend API already supports this, but the UI was rigidly disabling the dropdown based only on collaborator status. Changes: - Enable the branch selector for the issue poster and during new issue creation. - Fix a typo (.IsIssueWriter -> .IsIssuePoster) that was preventing the reference update URL from being correctly set for posters. Co-authored-by: fwag <30782430+fwag@users.noreply.github.com>
This commit is contained in:
@@ -145,6 +145,7 @@ func NewIssue(ctx *context.Context) {
|
||||
}
|
||||
|
||||
ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWrite(unit.TypeIssues)
|
||||
ctx.Data["IsIssuePoster"] = true // the current user will be the poster of the new issue
|
||||
|
||||
if !issueConfig.BlankIssuesEnabled && hasTemplates && !templateLoaded {
|
||||
// The "issues/new" and "issues/new/choose" share the same query parameters "project" and "milestone", if blank issues are disabled, just redirect to the "issues/choose" page with these parameters.
|
||||
|
||||
Reference in New Issue
Block a user