{"action":"created","comment":{"url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments/172050347","pull_request_review_id":101007270,"id":172050347,"diff_hunk":"@@ -185,21 +184,13 @@ def check_view_permissions\n   end\n \n   def check_add_permissions\n-    unless can_add_step_comment_in_protocol(@protocol)\n-      render_403\n-    end\n-  end\n-\n-  def check_edit_permissions\n-    @comment = StepComment.find_by_id(params[:id])\n-    render_403 unless @comment.present? &&\n-                      can_edit_step_comment_in_protocol(@comment)\n+    render_403 unless can_create_comments_in_module?(@protocol.my_module)\n   end\n \n-  def check_destroy_permissions\n+  def check_manage_permissions\n     @comment = StepComment.find_by_id(params[:id])\n     render_403 unless @comment.present? &&\n-                      can_delete_step_comment_in_protocol(@comment)\n+                      can_manage_comment_in_module?(@comment.becomes(Comment))","path":"app/controllers/step_comments_controller.rb","position":31,"original_position":31,"commit_id":"53f75f3cd6444edb107cb3cd590882c893ef0afd","original_commit_id":"ff9dff5c1080caab79b077dfd0390a53abdc35ee","user":{"login":"mz3944","id":3761496,"avatar_url":"https://avatars0.githubusercontent.com/u/3761496?v=4","gravatar_id":"","url":"https://api.github.com/users/mz3944","html_url":"https://github.com/mz3944","followers_url":"https://api.github.com/users/mz3944/followers","following_url":"https://api.github.com/users/mz3944/following{/other_user}","gists_url":"https://api.github.com/users/mz3944/gists{/gist_id}","starred_url":"https://api.github.com/users/mz3944/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mz3944/subscriptions","organizations_url":"https://api.github.com/users/mz3944/orgs","repos_url":"https://api.github.com/users/mz3944/repos","events_url":"https://api.github.com/users/mz3944/events{/privacy}","received_events_url":"https://api.github.com/users/mz3944/received_events","type":"User","site_admin":false},"body":"Can't see why not?","created_at":"2018-03-04T14:23:20Z","updated_at":"2018-03-04T14:23:20Z","html_url":"https://github.com/biosistemika/scinote-web/pull/1004#discussion_r172050347","pull_request_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/1004","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments/172050347"},"html":{"href":"https://github.com/biosistemika/scinote-web/pull/1004#discussion_r172050347"},"pull_request":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/1004"}},"in_reply_to_id":170633058},"pull_request":{"url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/1004","id":170567819,"html_url":"https://github.com/biosistemika/scinote-web/pull/1004","diff_url":"https://github.com/biosistemika/scinote-web/pull/1004.diff","patch_url":"https://github.com/biosistemika/scinote-web/pull/1004.patch","issue_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/1004","number":1004,"state":"open","locked":false,"title":"Wrapping up the permissions [SCI-2011]","user":{"login":"mz3944","id":3761496,"avatar_url":"https://avatars0.githubusercontent.com/u/3761496?v=4","gravatar_id":"","url":"https://api.github.com/users/mz3944","html_url":"https://github.com/mz3944","followers_url":"https://api.github.com/users/mz3944/followers","following_url":"https://api.github.com/users/mz3944/following{/other_user}","gists_url":"https://api.github.com/users/mz3944/gists{/gist_id}","starred_url":"https://api.github.com/users/mz3944/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mz3944/subscriptions","organizations_url":"https://api.github.com/users/mz3944/orgs","repos_url":"https://api.github.com/users/mz3944/repos","events_url":"https://api.github.com/users/mz3944/events{/privacy}","received_events_url":"https://api.github.com/users/mz3944/received_events","type":"User","site_admin":false},"body":"[SCI-2011](https://biosistemika.atlassian.net/browse/SCI-2011)\r\n\r\nDepends on:\r\n[!30](https://gitlab.com/biosistemika/scinote/addons/gilson_iot/merge_requests/30)\r\n[!12](https://gitlab.com/biosistemika/scinote/addons/electronic_signatures/merge_requests/12)\r\n[!8](https://gitlab.com/biosistemika/scinote/addons/audit_trails/merge_requests/8)\r\n[!13](https://gitlab.com/biosistemika/scinote/addons/organization_management/merge_requests/13)\r\n[!25](https://gitlab.com/biosistemika/scinote/addons/billing/merge_requests/25)\r\n[!28](https://gitlab.com/biosistemika/scinote/addons/ai/merge_requests/28)","created_at":"2018-02-21T19:38:16Z","updated_at":"2018-03-04T14:23:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c321ef95171e49d8b9c864ad89dec9af8b18a2f4","assignee":{"login":"mz3944","id":3761496,"avatar_url":"https://avatars0.githubusercontent.com/u/3761496?v=4","gravatar_id":"","url":"https://api.github.com/users/mz3944","html_url":"https://github.com/mz3944","followers_url":"https://api.github.com/users/mz3944/followers","following_url":"https://api.github.com/users/mz3944/following{/other_user}","gists_url":"https://api.github.com/users/mz3944/gists{/gist_id}","starred_url":"https://api.github.com/users/mz3944/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mz3944/subscriptions","organizations_url":"https://api.github.com/users/mz3944/orgs","repos_url":"https://api.github.com/users/mz3944/repos","events_url":"https://api.github.com/users/mz3944/events{/privacy}","received_events_url":"https://api.github.com/users/mz3944/received_events","type":"User","site_admin":false},"assignees":[{"login":"mz3944","id":3761496,"avatar_url":"https://avatars0.githubusercontent.com/u/3761496?v=4","gravatar_id":"","url":"https://api.github.com/users/mz3944","html_url":"https://github.com/mz3944","followers_url":"https://api.github.com/users/mz3944/followers","following_url":"https://api.github.com/users/mz3944/following{/other_user}","gists_url":"https://api.github.com/users/mz3944/gists{/gist_id}","starred_url":"https://api.github.com/users/mz3944/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mz3944/subscriptions","organizations_url":"https://api.github.com/users/mz3944/orgs","repos_url":"https://api.github.com/users/mz3944/repos","events_url":"https://api.github.com/users/mz3944/events{/privacy}","received_events_url":"https://api.github.com/users/mz3944/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/1004/commits","review_comments_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/1004/comments","review_comment_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/1004/comments","statuses_url":"https://api.github.com/repos/biosistemika/scinote-web/statuses/53f75f3cd6444edb107cb3cd590882c893ef0afd","head":{"label":"mz3944:mz-SCI-2011","ref":"mz-SCI-2011","sha":"53f75f3cd6444edb107cb3cd590882c893ef0afd","user":{"login":"mz3944","id":3761496,"avatar_url":"https://avatars0.githubusercontent.com/u/3761496?v=4","gravatar_id":"","url":"https://api.github.com/users/mz3944","html_url":"https://github.com/mz3944","followers_url":"https://api.github.com/users/mz3944/followers","following_url":"https://api.github.com/users/mz3944/following{/other_user}","gists_url":"https://api.github.com/users/mz3944/gists{/gist_id}","starred_url":"https://api.github.com/users/mz3944/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mz3944/subscriptions","organizations_url":"https://api.github.com/users/mz3944/orgs","repos_url":"https://api.github.com/users/mz3944/repos","events_url":"https://api.github.com/users/mz3944/events{/privacy}","received_events_url":"https://api.github.com/users/mz3944/received_events","type":"User","site_admin":false},"repo":{"id":66658242,"name":"scinote-web","full_name":"mz3944/scinote-web","owner":{"login":"mz3944","id":3761496,"avatar_url":"https://avatars0.githubusercontent.com/u/3761496?v=4","gravatar_id":"","url":"https://api.github.com/users/mz3944","html_url":"https://github.com/mz3944","followers_url":"https://api.github.com/users/mz3944/followers","following_url":"https://api.github.com/users/mz3944/following{/other_user}","gists_url":"https://api.github.com/users/mz3944/gists{/gist_id}","starred_url":"https://api.github.com/users/mz3944/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mz3944/subscriptions","organizations_url":"https://api.github.com/users/mz3944/orgs","repos_url":"https://api.github.com/users/mz3944/repos","events_url":"https://api.github.com/users/mz3944/events{/privacy}","received_events_url":"https://api.github.com/users/mz3944/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mz3944/scinote-web","description":"Open source electronic scientific notebook (ELN) that helps you manage your laboratory work and stores all your experimental data in one place.","fork":true,"url":"https://api.github.com/repos/mz3944/scinote-web","forks_url":"https://api.github.com/repos/mz3944/scinote-web/forks","keys_url":"https://api.github.com/repos/mz3944/scinote-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mz3944/scinote-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mz3944/scinote-web/teams","hooks_url":"https://api.github.com/repos/mz3944/scinote-web/hooks","issue_events_url":"https://api.github.com/repos/mz3944/scinote-web/issues/events{/number}","events_url":"https://api.github.com/repos/mz3944/scinote-web/events","assignees_url":"https://api.github.com/repos/mz3944/scinote-web/assignees{/user}","branches_url":"https://api.github.com/repos/mz3944/scinote-web/branches{/branch}","tags_url":"https://api.github.com/repos/mz3944/scinote-web/tags","blobs_url":"https://api.github.com/repos/mz3944/scinote-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mz3944/scinote-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mz3944/scinote-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/mz3944/scinote-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mz3944/scinote-web/statuses/{sha}","languages_url":"https://api.github.com/repos/mz3944/scinote-web/languages","stargazers_url":"https://api.github.com/repos/mz3944/scinote-web/stargazers","contributors_url":"https://api.github.com/repos/mz3944/scinote-web/contributors","subscribers_url":"https://api.github.com/repos/mz3944/scinote-web/subscribers","subscription_url":"https://api.github.com/repos/mz3944/scinote-web/subscription","commits_url":"https://api.github.com/repos/mz3944/scinote-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/mz3944/scinote-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/mz3944/scinote-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/mz3944/scinote-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/mz3944/scinote-web/contents/{+path}","compare_url":"https://api.github.com/repos/mz3944/scinote-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mz3944/scinote-web/merges","archive_url":"https://api.github.com/repos/mz3944/scinote-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mz3944/scinote-web/downloads","issues_url":"https://api.github.com/repos/mz3944/scinote-web/issues{/number}","pulls_url":"https://api.github.com/repos/mz3944/scinote-web/pulls{/number}","milestones_url":"https://api.github.com/repos/mz3944/scinote-web/milestones{/number}","notifications_url":"https://api.github.com/repos/mz3944/scinote-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mz3944/scinote-web/labels{/name}","releases_url":"https://api.github.com/repos/mz3944/scinote-web/releases{/id}","deployments_url":"https://api.github.com/repos/mz3944/scinote-web/deployments","created_at":"2016-08-26T15:24:26Z","updated_at":"2016-08-26T15:24:27Z","pushed_at":"2018-03-04T13:54:59Z","git_url":"git://github.com/mz3944/scinote-web.git","ssh_url":"git@github.com:mz3944/scinote-web.git","clone_url":"https://github.com/mz3944/scinote-web.git","svn_url":"https://github.com/mz3944/scinote-web","homepage":"http://www.scinote.net","size":12977,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"biosistemika:master","ref":"master","sha":"4d69636dbe4cd8384e00e54c62eff41b93958761","user":{"login":"biosistemika","id":15630206,"avatar_url":"https://avatars2.githubusercontent.com/u/15630206?v=4","gravatar_id":"","url":"https://api.github.com/users/biosistemika","html_url":"https://github.com/biosistemika","followers_url":"https://api.github.com/users/biosistemika/followers","following_url":"https://api.github.com/users/biosistemika/following{/other_user}","gists_url":"https://api.github.com/users/biosistemika/gists{/gist_id}","starred_url":"https://api.github.com/users/biosistemika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biosistemika/subscriptions","organizations_url":"https://api.github.com/users/biosistemika/orgs","repos_url":"https://api.github.com/users/biosistemika/repos","events_url":"https://api.github.com/users/biosistemika/events{/privacy}","received_events_url":"https://api.github.com/users/biosistemika/received_events","type":"Organization","site_admin":false},"repo":{"id":51598133,"name":"scinote-web","full_name":"biosistemika/scinote-web","owner":{"login":"biosistemika","id":15630206,"avatar_url":"https://avatars2.githubusercontent.com/u/15630206?v=4","gravatar_id":"","url":"https://api.github.com/users/biosistemika","html_url":"https://github.com/biosistemika","followers_url":"https://api.github.com/users/biosistemika/followers","following_url":"https://api.github.com/users/biosistemika/following{/other_user}","gists_url":"https://api.github.com/users/biosistemika/gists{/gist_id}","starred_url":"https://api.github.com/users/biosistemika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biosistemika/subscriptions","organizations_url":"https://api.github.com/users/biosistemika/orgs","repos_url":"https://api.github.com/users/biosistemika/repos","events_url":"https://api.github.com/users/biosistemika/events{/privacy}","received_events_url":"https://api.github.com/users/biosistemika/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biosistemika/scinote-web","description":"Open source electronic lab notebook (ELN) that helps you manage your laboratory work and stores all your experimental data in one place.","fork":false,"url":"https://api.github.com/repos/biosistemika/scinote-web","forks_url":"https://api.github.com/repos/biosistemika/scinote-web/forks","keys_url":"https://api.github.com/repos/biosistemika/scinote-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biosistemika/scinote-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biosistemika/scinote-web/teams","hooks_url":"https://api.github.com/repos/biosistemika/scinote-web/hooks","issue_events_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/events{/number}","events_url":"https://api.github.com/repos/biosistemika/scinote-web/events","assignees_url":"https://api.github.com/repos/biosistemika/scinote-web/assignees{/user}","branches_url":"https://api.github.com/repos/biosistemika/scinote-web/branches{/branch}","tags_url":"https://api.github.com/repos/biosistemika/scinote-web/tags","blobs_url":"https://api.github.com/repos/biosistemika/scinote-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biosistemika/scinote-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biosistemika/scinote-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/biosistemika/scinote-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biosistemika/scinote-web/statuses/{sha}","languages_url":"https://api.github.com/repos/biosistemika/scinote-web/languages","stargazers_url":"https://api.github.com/repos/biosistemika/scinote-web/stargazers","contributors_url":"https://api.github.com/repos/biosistemika/scinote-web/contributors","subscribers_url":"https://api.github.com/repos/biosistemika/scinote-web/subscribers","subscription_url":"https://api.github.com/repos/biosistemika/scinote-web/subscription","commits_url":"https://api.github.com/repos/biosistemika/scinote-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/biosistemika/scinote-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/biosistemika/scinote-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/biosistemika/scinote-web/contents/{+path}","compare_url":"https://api.github.com/repos/biosistemika/scinote-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biosistemika/scinote-web/merges","archive_url":"https://api.github.com/repos/biosistemika/scinote-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biosistemika/scinote-web/downloads","issues_url":"https://api.github.com/repos/biosistemika/scinote-web/issues{/number}","pulls_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls{/number}","milestones_url":"https://api.github.com/repos/biosistemika/scinote-web/milestones{/number}","notifications_url":"https://api.github.com/repos/biosistemika/scinote-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biosistemika/scinote-web/labels{/name}","releases_url":"https://api.github.com/repos/biosistemika/scinote-web/releases{/id}","deployments_url":"https://api.github.com/repos/biosistemika/scinote-web/deployments","created_at":"2016-02-12T15:47:19Z","updated_at":"2018-02-15T00:39:47Z","pushed_at":"2018-03-04T13:55:00Z","git_url":"git://github.com/biosistemika/scinote-web.git","ssh_url":"git@github.com:biosistemika/scinote-web.git","clone_url":"https://github.com/biosistemika/scinote-web.git","svn_url":"https://github.com/biosistemika/scinote-web","homepage":"https://www.scinote.net","size":24631,"stargazers_count":129,"watchers_count":129,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":39,"open_issues":13,"watchers":129,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/1004"},"html":{"href":"https://github.com/biosistemika/scinote-web/pull/1004"},"issue":{"href":"https://api.github.com/repos/biosistemika/scinote-web/issues/1004"},"comments":{"href":"https://api.github.com/repos/biosistemika/scinote-web/issues/1004/comments"},"review_comments":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/1004/comments"},"review_comment":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/1004/commits"},"statuses":{"href":"https://api.github.com/repos/biosistemika/scinote-web/statuses/53f75f3cd6444edb107cb3cd590882c893ef0afd"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mz3944"}}