summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-01-20 20:00:32 +0800
committerAntoine GIRARD <sapk@users.noreply.github.com>2020-01-20 13:00:32 +0100
commit6d6f1d568ec36786b1020f4b43cbd872228c6633 (patch)
tree8aa01b789a6737644eeb1512887355357b1ed0a0 /templates
parent81cfe243f9cb90b0a75de7a03bb2d264c97f0036 (diff)
downloadgitea-6d6f1d568ec36786b1020f4b43cbd872228c6633.tar.gz
gitea-6d6f1d568ec36786b1020f4b43cbd872228c6633.zip
Fix wrong permissions check when issues/prs shared operations (#9885)
* Fix wrong permissions check when issues/prs shared operations * move redirect to the last of the function * fix swagger Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_content.tmpl2
-rw-r--r--templates/swagger/v1_json.tmpl6
2 files changed, 7 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index bee8a3dfe5..d336b78049 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -66,7 +66,7 @@
{{ template "repo/issue/view_content/pull". }}
{{end}}
{{if .IsSigned}}
- {{ if and (or .IsRepoAdmin .IsRepoIssuesWriter (or (not .Issue.IsLocked))) (not .Repository.IsArchived) }}
+ {{ if and (or .IsRepoAdmin .IsIssueWriter (or (not .Issue.IsLocked))) (not .Repository.IsArchived) }}
<div class="comment form">
<a class="avatar" href="{{.SignedUser.HomeLink}}">
<img src="{{.SignedUser.RelAvatarLink}}">
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 95932d9e02..7aa29f0b08 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -3133,6 +3133,12 @@
"description": "search string",
"name": "q",
"in": "query"
+ },
+ {
+ "type": "string",
+ "description": "filter by type (issues / pulls) if set",
+ "name": "type",
+ "in": "query"
}
],
"responses": {