diff options
author | qwerty287 <80460567+qwerty287@users.noreply.github.com> | 2021-11-28 05:13:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-28 12:13:13 +0800 |
commit | 24a8d54bfb908a2371cb808a5243b3290dd0664a (patch) | |
tree | ea629e7bfed99f2e21b81b6c3adaf36fa466c4c5 /routers | |
parent | fbadc1a1982f9133ecc8a7f9debe32525703eb27 (diff) | |
download | gitea-24a8d54bfb908a2371cb808a5243b3290dd0664a.tar.gz gitea-24a8d54bfb908a2371cb808a5243b3290dd0664a.zip |
Disable ref selection dropdown if you don't have permissions to use it (#17837)
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/issue.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 1ff126c7d1..2e0118e03f 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -955,7 +955,6 @@ func NewIssuePost(ctx *context.Context) { ctx.Data["NewIssueChooseTemplate"] = len(ctx.IssueTemplatesFromDefaultBranch()) > 0 ctx.Data["RequireHighlightJS"] = true ctx.Data["RequireSimpleMDE"] = true - ctx.Data["ReadOnly"] = false ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled upload.AddUploadContext(ctx, "comment") @@ -1630,7 +1629,6 @@ func ViewIssue(ctx *context.Context) { ctx.Data["Participants"] = participants ctx.Data["NumParticipants"] = len(participants) ctx.Data["Issue"] = issue - ctx.Data["ReadOnly"] = false ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login?redirect_to=" + url.QueryEscape(ctx.Data["Link"].(string)) ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID) ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) |