{"action":"created","comment":{"url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/comments/42580826","id":42580826,"diff_hunk":"@@ -94,9 +100,16 @@ class CommentService {\n      */\n     @Transactional\n     Comment update(Object json){\n+        Boolean update = false\n         Comment comment = Comment.get(json.id);\n         if (comment) {\n             if (comment.userId == json.userId) {\n+                update = true;\n+            }  else if(doesUserHavePrivilege(json.userId, json.entityId, json.entityType) || json.isALAAdmin){\n+                update = true;\n+            }\n+\n+            if(update){\n                 comment.text = json.text;\n                 //update time\n                 comment.dateCreated = new Date();","path":"grails-app/services/au/org/ala/ecodata/CommentService.groovy","position":32,"original_position":32,"commit_id":"26e83907beb5f2e099efc1634cabb2f34b915ab1","original_commit_id":"26e83907beb5f2e099efc1634cabb2f34b915ab1","user":{"login":"chrisala","id":8001629,"avatar_url":"https://avatars.githubusercontent.com/u/8001629?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisala","html_url":"https://github.com/chrisala","followers_url":"https://api.github.com/users/chrisala/followers","following_url":"https://api.github.com/users/chrisala/following{/other_user}","gists_url":"https://api.github.com/users/chrisala/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisala/subscriptions","organizations_url":"https://api.github.com/users/chrisala/orgs","repos_url":"https://api.github.com/users/chrisala/repos","events_url":"https://api.github.com/users/chrisala/events{/privacy}","received_events_url":"https://api.github.com/users/chrisala/received_events","type":"User","site_admin":false},"body":"Is dateCreated the right value to edit?  If you add a lastUpdated field to the Domain object it should be updated by GORM.","created_at":"2015-10-21T03:43:30Z","updated_at":"2015-10-21T03:43:30Z","html_url":"https://github.com/AtlasOfLivingAustralia/ecodata/pull/129#discussion_r42580826","pull_request_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/comments/42580826"},"html":{"href":"https://github.com/AtlasOfLivingAustralia/ecodata/pull/129#discussion_r42580826"},"pull_request":{"href":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/129","id":48166507,"html_url":"https://github.com/AtlasOfLivingAustralia/ecodata/pull/129","diff_url":"https://github.com/AtlasOfLivingAustralia/ecodata/pull/129.diff","patch_url":"https://github.com/AtlasOfLivingAustralia/ecodata/pull/129.patch","issue_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/issues/129","number":129,"state":"open","locked":false,"title":"fixes AtlasOfLivingAustralia/biocollect/#87: now admin can delete/edi…","user":{"login":"temi","id":1152259,"avatar_url":"https://avatars.githubusercontent.com/u/1152259?v=3","gravatar_id":"","url":"https://api.github.com/users/temi","html_url":"https://github.com/temi","followers_url":"https://api.github.com/users/temi/followers","following_url":"https://api.github.com/users/temi/following{/other_user}","gists_url":"https://api.github.com/users/temi/gists{/gist_id}","starred_url":"https://api.github.com/users/temi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/temi/subscriptions","organizations_url":"https://api.github.com/users/temi/orgs","repos_url":"https://api.github.com/users/temi/repos","events_url":"https://api.github.com/users/temi/events{/privacy}","received_events_url":"https://api.github.com/users/temi/received_events","type":"User","site_admin":false},"body":"…t comments","created_at":"2015-10-20T07:46:59Z","updated_at":"2015-10-21T03:43:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbb97d5e2affca84dc35934c5cb602bce6002ca1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/129/commits","review_comments_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/129/comments","review_comment_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/issues/129/comments","statuses_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/statuses/26e83907beb5f2e099efc1634cabb2f34b915ab1","head":{"label":"AtlasOfLivingAustralia:123-dev","ref":"123-dev","sha":"26e83907beb5f2e099efc1634cabb2f34b915ab1","user":{"login":"AtlasOfLivingAustralia","id":7296572,"avatar_url":"https://avatars.githubusercontent.com/u/7296572?v=3","gravatar_id":"","url":"https://api.github.com/users/AtlasOfLivingAustralia","html_url":"https://github.com/AtlasOfLivingAustralia","followers_url":"https://api.github.com/users/AtlasOfLivingAustralia/followers","following_url":"https://api.github.com/users/AtlasOfLivingAustralia/following{/other_user}","gists_url":"https://api.github.com/users/AtlasOfLivingAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/AtlasOfLivingAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtlasOfLivingAustralia/subscriptions","organizations_url":"https://api.github.com/users/AtlasOfLivingAustralia/orgs","repos_url":"https://api.github.com/users/AtlasOfLivingAustralia/repos","events_url":"https://api.github.com/users/AtlasOfLivingAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/AtlasOfLivingAustralia/received_events","type":"Organization","site_admin":false},"repo":{"id":21556876,"name":"ecodata","full_name":"AtlasOfLivingAustralia/ecodata","owner":{"login":"AtlasOfLivingAustralia","id":7296572,"avatar_url":"https://avatars.githubusercontent.com/u/7296572?v=3","gravatar_id":"","url":"https://api.github.com/users/AtlasOfLivingAustralia","html_url":"https://github.com/AtlasOfLivingAustralia","followers_url":"https://api.github.com/users/AtlasOfLivingAustralia/followers","following_url":"https://api.github.com/users/AtlasOfLivingAustralia/following{/other_user}","gists_url":"https://api.github.com/users/AtlasOfLivingAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/AtlasOfLivingAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtlasOfLivingAustralia/subscriptions","organizations_url":"https://api.github.com/users/AtlasOfLivingAustralia/orgs","repos_url":"https://api.github.com/users/AtlasOfLivingAustralia/repos","events_url":"https://api.github.com/users/AtlasOfLivingAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/AtlasOfLivingAustralia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AtlasOfLivingAustralia/ecodata","description":"Data capture webservices","fork":false,"url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata","forks_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/forks","keys_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/teams","hooks_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/hooks","issue_events_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/issues/events{/number}","events_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/events","assignees_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/assignees{/user}","branches_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/branches{/branch}","tags_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/tags","blobs_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/git/refs{/sha}","trees_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/statuses/{sha}","languages_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/languages","stargazers_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/stargazers","contributors_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/contributors","subscribers_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/subscribers","subscription_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/subscription","commits_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/commits{/sha}","git_commits_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/git/commits{/sha}","comments_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/comments{/number}","issue_comment_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/issues/comments{/number}","contents_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/contents/{+path}","compare_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/merges","archive_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/downloads","issues_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/issues{/number}","pulls_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls{/number}","milestones_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/milestones{/number}","notifications_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/labels{/name}","releases_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/releases{/id}","created_at":"2014-07-07T04:39:04Z","updated_at":"2015-06-30T16:03:13Z","pushed_at":"2015-10-20T07:46:59Z","git_url":"git://github.com/AtlasOfLivingAustralia/ecodata.git","ssh_url":"git@github.com:AtlasOfLivingAustralia/ecodata.git","clone_url":"https://github.com/AtlasOfLivingAustralia/ecodata.git","svn_url":"https://github.com/AtlasOfLivingAustralia/ecodata","homepage":"http://ecodata.ala.org.au/documentation/index","size":7789,"stargazers_count":3,"watchers_count":3,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"AtlasOfLivingAustralia:dev","ref":"dev","sha":"8efab9afac784a38545dea18774602d33ceb4a95","user":{"login":"AtlasOfLivingAustralia","id":7296572,"avatar_url":"https://avatars.githubusercontent.com/u/7296572?v=3","gravatar_id":"","url":"https://api.github.com/users/AtlasOfLivingAustralia","html_url":"https://github.com/AtlasOfLivingAustralia","followers_url":"https://api.github.com/users/AtlasOfLivingAustralia/followers","following_url":"https://api.github.com/users/AtlasOfLivingAustralia/following{/other_user}","gists_url":"https://api.github.com/users/AtlasOfLivingAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/AtlasOfLivingAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtlasOfLivingAustralia/subscriptions","organizations_url":"https://api.github.com/users/AtlasOfLivingAustralia/orgs","repos_url":"https://api.github.com/users/AtlasOfLivingAustralia/repos","events_url":"https://api.github.com/users/AtlasOfLivingAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/AtlasOfLivingAustralia/received_events","type":"Organization","site_admin":false},"repo":{"id":21556876,"name":"ecodata","full_name":"AtlasOfLivingAustralia/ecodata","owner":{"login":"AtlasOfLivingAustralia","id":7296572,"avatar_url":"https://avatars.githubusercontent.com/u/7296572?v=3","gravatar_id":"","url":"https://api.github.com/users/AtlasOfLivingAustralia","html_url":"https://github.com/AtlasOfLivingAustralia","followers_url":"https://api.github.com/users/AtlasOfLivingAustralia/followers","following_url":"https://api.github.com/users/AtlasOfLivingAustralia/following{/other_user}","gists_url":"https://api.github.com/users/AtlasOfLivingAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/AtlasOfLivingAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtlasOfLivingAustralia/subscriptions","organizations_url":"https://api.github.com/users/AtlasOfLivingAustralia/orgs","repos_url":"https://api.github.com/users/AtlasOfLivingAustralia/repos","events_url":"https://api.github.com/users/AtlasOfLivingAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/AtlasOfLivingAustralia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AtlasOfLivingAustralia/ecodata","description":"Data capture webservices","fork":false,"url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata","forks_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/forks","keys_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/teams","hooks_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/hooks","issue_events_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/issues/events{/number}","events_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/events","assignees_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/assignees{/user}","branches_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/branches{/branch}","tags_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/tags","blobs_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/git/refs{/sha}","trees_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/statuses/{sha}","languages_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/languages","stargazers_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/stargazers","contributors_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/contributors","subscribers_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/subscribers","subscription_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/subscription","commits_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/commits{/sha}","git_commits_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/git/commits{/sha}","comments_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/comments{/number}","issue_comment_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/issues/comments{/number}","contents_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/contents/{+path}","compare_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/merges","archive_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/downloads","issues_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/issues{/number}","pulls_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls{/number}","milestones_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/milestones{/number}","notifications_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/labels{/name}","releases_url":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/releases{/id}","created_at":"2014-07-07T04:39:04Z","updated_at":"2015-06-30T16:03:13Z","pushed_at":"2015-10-20T07:46:59Z","git_url":"git://github.com/AtlasOfLivingAustralia/ecodata.git","ssh_url":"git@github.com:AtlasOfLivingAustralia/ecodata.git","clone_url":"https://github.com/AtlasOfLivingAustralia/ecodata.git","svn_url":"https://github.com/AtlasOfLivingAustralia/ecodata","homepage":"http://ecodata.ala.org.au/documentation/index","size":7789,"stargazers_count":3,"watchers_count":3,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/129"},"html":{"href":"https://github.com/AtlasOfLivingAustralia/ecodata/pull/129"},"issue":{"href":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/issues/129"},"comments":{"href":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/AtlasOfLivingAustralia/ecodata/statuses/26e83907beb5f2e099efc1634cabb2f34b915ab1"}}}}