diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-20 20:00:32 +0800 |
---|---|---|
committer | Antoine GIRARD <sapk@users.noreply.github.com> | 2020-01-20 13:00:32 +0100 |
commit | 6d6f1d568ec36786b1020f4b43cbd872228c6633 (patch) | |
tree | 8aa01b789a6737644eeb1512887355357b1ed0a0 /templates | |
parent | 81cfe243f9cb90b0a75de7a03bb2d264c97f0036 (diff) | |
download | gitea-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.tmpl | 2 | ||||
-rw-r--r-- | templates/swagger/v1_json.tmpl | 6 |
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": { |