Commit graph

9 commits

Author SHA1 Message Date
Andy Allan
78b9d92207 Prefer keyword arguments when method has optional boolean arguments 2020-11-12 11:24:44 +00:00
Andy Allan
dad36f2fca Use a lambda in order to pass parameters in before_actions
This avoid calling methods on a new instance of the controller, and
therefore allows these methods to be marked as private.

As a bonus, rubocop can now parse them and warn when they refer to
actions that don't exist in the controller.
2019-03-20 15:08:36 +01:00
Andy Allan
947a41edee Move the api methods from changeset_comments_controller into the api namespaced controller 2019-02-24 12:38:09 +01:00
Andy Allan
8f70fb2114 Use CanCanCan for changeset comments
This introduces different deny_access handlers for web and api requests, since we want to avoid sending redirects as API responses. See #2064 for discussion.
2018-11-28 12:35:45 +01:00
Tom Hughes
4deffa5e40 Skip CSRF verification for changeset comment actions
Fixes #2057
2018-11-13 13:17:19 +00:00
Andy Allan
04afeeb32f Rename hide_comment and unhide_comment to destroy and restore
This preserves the API endpoints and HTTP methods, which could be changed in the next API version
2018-11-07 10:51:43 +01:00
Andy Allan
4b0d56f7e1 Rename comments_feed to index 2018-11-07 10:22:07 +01:00
Andy Allan
b7e871cb46 Rename comment to create 2018-11-07 10:22:07 +01:00
Andy Allan
19c2b92fb7 Split changeset comment handling into a changeset_comments controller 2018-11-07 10:20:14 +01:00