{"action":"created","comment":{"url":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/comments/181694581","pull_request_review_id":112363780,"id":181694581,"diff_hunk":"@@ -143,4 +141,12 @@\n     return new ResponseEntity<String>(\n         reportService.createEventReport(), httpHeaders, HttpStatus.OK);\n   }\n+\n+  @PreAuthorize(\"hasRole('OBSERVER')\")","path":"src/main/java/edu/harvard/h2ms/web/controller/EventController.java","position":18,"original_position":18,"commit_id":"b7c02bb117577a0b6fd121da0ac95698e9044b01","original_commit_id":"b7c02bb117577a0b6fd121da0ac95698e9044b01","user":{"login":"stbenjam","id":429763,"avatar_url":"https://avatars3.githubusercontent.com/u/429763?v=4","gravatar_id":"","url":"https://api.github.com/users/stbenjam","html_url":"https://github.com/stbenjam","followers_url":"https://api.github.com/users/stbenjam/followers","following_url":"https://api.github.com/users/stbenjam/following{/other_user}","gists_url":"https://api.github.com/users/stbenjam/gists{/gist_id}","starred_url":"https://api.github.com/users/stbenjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stbenjam/subscriptions","organizations_url":"https://api.github.com/users/stbenjam/orgs","repos_url":"https://api.github.com/users/stbenjam/repos","events_url":"https://api.github.com/users/stbenjam/events{/privacy}","received_events_url":"https://api.github.com/users/stbenjam/received_events","type":"User","site_admin":false},"body":"Would an admin be able to access this controller?","created_at":"2018-04-16T10:53:26Z","updated_at":"2018-04-16T10:54:56Z","html_url":"https://github.com/2018swecapstone/h2ms/pull/90#discussion_r181694581","pull_request_url":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/90","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/comments/181694581"},"html":{"href":"https://github.com/2018swecapstone/h2ms/pull/90#discussion_r181694581"},"pull_request":{"href":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/90"}}},"pull_request":{"url":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/90","id":181730480,"html_url":"https://github.com/2018swecapstone/h2ms/pull/90","diff_url":"https://github.com/2018swecapstone/h2ms/pull/90.diff","patch_url":"https://github.com/2018swecapstone/h2ms/pull/90.patch","issue_url":"https://api.github.com/repos/2018swecapstone/h2ms/issues/90","number":90,"state":"open","locked":false,"title":"Controller Based Access Control","user":{"login":"MichaelDelaney","id":8715964,"avatar_url":"https://avatars2.githubusercontent.com/u/8715964?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelDelaney","html_url":"https://github.com/MichaelDelaney","followers_url":"https://api.github.com/users/MichaelDelaney/followers","following_url":"https://api.github.com/users/MichaelDelaney/following{/other_user}","gists_url":"https://api.github.com/users/MichaelDelaney/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelDelaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelDelaney/subscriptions","organizations_url":"https://api.github.com/users/MichaelDelaney/orgs","repos_url":"https://api.github.com/users/MichaelDelaney/repos","events_url":"https://api.github.com/users/MichaelDelaney/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelDelaney/received_events","type":"User","site_admin":false},"body":"### Please give a short summary of what's included in this submission\r\n\r\nSome comments:\r\n- @Shin - I updated the Role class to align w/ the data model diagram in our milestone 2 presentation. Did you want it the way you had it for some function/feature? I don't want to break something of yours. \r\n- I'll update the documentation accordingly, but as of now there are 3 role types: ADMIN, USER, and OBSERVER. \r\n- I made it controller based access control because if I did repository based, it would have been a catch-22; seeders and initial data loaders wouldn't be able to persist.\r\n- *IMPORTANT* How will user roles be initially set? Do we need to add something to a method to automatically make new users have a default role of USER; or will UI include it in this API request; or something else? Check out the commented out snippet I added to the sec-config. Looking for a better way to set roles for in memory auth for testing.\r\n\r\n### Checklist\r\n- [x] The Pull Request title describes the changes I've made\r\n- [x] I've reviewed the **Files changed** tab\r\n- [x] The code in the **Files changed** tab meets our style guides\r\n- [ ] New classes and public methods in the **Files changed** tab are documented\r\n- [x] I've added two reviewers for this pull request\r\n\r\n\r\n### Frontend Reviewer Checklist\r\n##### I've reviewed the observe page, reports page, and any page directly affected by these changes\r\n- [ ] For Mobile (width: ~320px) [View](http://whatismyscreenresolution.net/multi-screen-test?site-url=http://localhost:4200/login&w=320&h=480)\r\n- [ ] For Tablet landscape (width: ~1024px) [View](http://whatismyscreenresolution.net/multi-screen-test?site-url=http://localhost:4200/login&w=1024&h=768)\r\n- [ ] For Desktop (width: 1920px) [View](http://whatismyscreenresolution.net/multi-screen-test?site-url=http://localhost:4200/login&w=1920&h=1080)\r\n- [ ] I've reviewed the **Files Changed** Tab and left constructive criticism (if applicable)\r\n\r\n###### Optional\r\n- [ ] For Tablet portrait (width: ~768px) [View](http://whatismyscreenresolution.net/multi-screen-test?site-url=http://localhost:4200/login&w=768&h=1024)","created_at":"2018-04-16T00:24:48Z","updated_at":"2018-04-16T10:54:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"598b58e546fe8138d4863a9ab3474445b8c57c86","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/90/commits","review_comments_url":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/90/comments","review_comment_url":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/2018swecapstone/h2ms/issues/90/comments","statuses_url":"https://api.github.com/repos/2018swecapstone/h2ms/statuses/b7c02bb117577a0b6fd121da0ac95698e9044b01","head":{"label":"2018swecapstone:backend","ref":"backend","sha":"b7c02bb117577a0b6fd121da0ac95698e9044b01","user":{"login":"2018swecapstone","id":36141934,"avatar_url":"https://avatars2.githubusercontent.com/u/36141934?v=4","gravatar_id":"","url":"https://api.github.com/users/2018swecapstone","html_url":"https://github.com/2018swecapstone","followers_url":"https://api.github.com/users/2018swecapstone/followers","following_url":"https://api.github.com/users/2018swecapstone/following{/other_user}","gists_url":"https://api.github.com/users/2018swecapstone/gists{/gist_id}","starred_url":"https://api.github.com/users/2018swecapstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2018swecapstone/subscriptions","organizations_url":"https://api.github.com/users/2018swecapstone/orgs","repos_url":"https://api.github.com/users/2018swecapstone/repos","events_url":"https://api.github.com/users/2018swecapstone/events{/privacy}","received_events_url":"https://api.github.com/users/2018swecapstone/received_events","type":"Organization","site_admin":false},"repo":{"id":121564633,"name":"h2ms","full_name":"2018swecapstone/h2ms","owner":{"login":"2018swecapstone","id":36141934,"avatar_url":"https://avatars2.githubusercontent.com/u/36141934?v=4","gravatar_id":"","url":"https://api.github.com/users/2018swecapstone","html_url":"https://github.com/2018swecapstone","followers_url":"https://api.github.com/users/2018swecapstone/followers","following_url":"https://api.github.com/users/2018swecapstone/following{/other_user}","gists_url":"https://api.github.com/users/2018swecapstone/gists{/gist_id}","starred_url":"https://api.github.com/users/2018swecapstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2018swecapstone/subscriptions","organizations_url":"https://api.github.com/users/2018swecapstone/orgs","repos_url":"https://api.github.com/users/2018swecapstone/repos","events_url":"https://api.github.com/users/2018swecapstone/events{/privacy}","received_events_url":"https://api.github.com/users/2018swecapstone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2018swecapstone/h2ms","description":"Hand Hygiene Monitoring System","fork":false,"url":"https://api.github.com/repos/2018swecapstone/h2ms","forks_url":"https://api.github.com/repos/2018swecapstone/h2ms/forks","keys_url":"https://api.github.com/repos/2018swecapstone/h2ms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2018swecapstone/h2ms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2018swecapstone/h2ms/teams","hooks_url":"https://api.github.com/repos/2018swecapstone/h2ms/hooks","issue_events_url":"https://api.github.com/repos/2018swecapstone/h2ms/issues/events{/number}","events_url":"https://api.github.com/repos/2018swecapstone/h2ms/events","assignees_url":"https://api.github.com/repos/2018swecapstone/h2ms/assignees{/user}","branches_url":"https://api.github.com/repos/2018swecapstone/h2ms/branches{/branch}","tags_url":"https://api.github.com/repos/2018swecapstone/h2ms/tags","blobs_url":"https://api.github.com/repos/2018swecapstone/h2ms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2018swecapstone/h2ms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2018swecapstone/h2ms/git/refs{/sha}","trees_url":"https://api.github.com/repos/2018swecapstone/h2ms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2018swecapstone/h2ms/statuses/{sha}","languages_url":"https://api.github.com/repos/2018swecapstone/h2ms/languages","stargazers_url":"https://api.github.com/repos/2018swecapstone/h2ms/stargazers","contributors_url":"https://api.github.com/repos/2018swecapstone/h2ms/contributors","subscribers_url":"https://api.github.com/repos/2018swecapstone/h2ms/subscribers","subscription_url":"https://api.github.com/repos/2018swecapstone/h2ms/subscription","commits_url":"https://api.github.com/repos/2018swecapstone/h2ms/commits{/sha}","git_commits_url":"https://api.github.com/repos/2018swecapstone/h2ms/git/commits{/sha}","comments_url":"https://api.github.com/repos/2018swecapstone/h2ms/comments{/number}","issue_comment_url":"https://api.github.com/repos/2018swecapstone/h2ms/issues/comments{/number}","contents_url":"https://api.github.com/repos/2018swecapstone/h2ms/contents/{+path}","compare_url":"https://api.github.com/repos/2018swecapstone/h2ms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2018swecapstone/h2ms/merges","archive_url":"https://api.github.com/repos/2018swecapstone/h2ms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2018swecapstone/h2ms/downloads","issues_url":"https://api.github.com/repos/2018swecapstone/h2ms/issues{/number}","pulls_url":"https://api.github.com/repos/2018swecapstone/h2ms/pulls{/number}","milestones_url":"https://api.github.com/repos/2018swecapstone/h2ms/milestones{/number}","notifications_url":"https://api.github.com/repos/2018swecapstone/h2ms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2018swecapstone/h2ms/labels{/name}","releases_url":"https://api.github.com/repos/2018swecapstone/h2ms/releases{/id}","deployments_url":"https://api.github.com/repos/2018swecapstone/h2ms/deployments","created_at":"2018-02-14T21:42:02Z","updated_at":"2018-04-15T16:08:37Z","pushed_at":"2018-04-16T01:03:11Z","git_url":"git://github.com/2018swecapstone/h2ms.git","ssh_url":"git@github.com:2018swecapstone/h2ms.git","clone_url":"https://github.com/2018swecapstone/h2ms.git","svn_url":"https://github.com/2018swecapstone/h2ms","homepage":"","size":1553,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":5,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"2018swecapstone:master","ref":"master","sha":"13e5c94d1f54421575977ecb92542cfa227b960a","user":{"login":"2018swecapstone","id":36141934,"avatar_url":"https://avatars2.githubusercontent.com/u/36141934?v=4","gravatar_id":"","url":"https://api.github.com/users/2018swecapstone","html_url":"https://github.com/2018swecapstone","followers_url":"https://api.github.com/users/2018swecapstone/followers","following_url":"https://api.github.com/users/2018swecapstone/following{/other_user}","gists_url":"https://api.github.com/users/2018swecapstone/gists{/gist_id}","starred_url":"https://api.github.com/users/2018swecapstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2018swecapstone/subscriptions","organizations_url":"https://api.github.com/users/2018swecapstone/orgs","repos_url":"https://api.github.com/users/2018swecapstone/repos","events_url":"https://api.github.com/users/2018swecapstone/events{/privacy}","received_events_url":"https://api.github.com/users/2018swecapstone/received_events","type":"Organization","site_admin":false},"repo":{"id":121564633,"name":"h2ms","full_name":"2018swecapstone/h2ms","owner":{"login":"2018swecapstone","id":36141934,"avatar_url":"https://avatars2.githubusercontent.com/u/36141934?v=4","gravatar_id":"","url":"https://api.github.com/users/2018swecapstone","html_url":"https://github.com/2018swecapstone","followers_url":"https://api.github.com/users/2018swecapstone/followers","following_url":"https://api.github.com/users/2018swecapstone/following{/other_user}","gists_url":"https://api.github.com/users/2018swecapstone/gists{/gist_id}","starred_url":"https://api.github.com/users/2018swecapstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2018swecapstone/subscriptions","organizations_url":"https://api.github.com/users/2018swecapstone/orgs","repos_url":"https://api.github.com/users/2018swecapstone/repos","events_url":"https://api.github.com/users/2018swecapstone/events{/privacy}","received_events_url":"https://api.github.com/users/2018swecapstone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/2018swecapstone/h2ms","description":"Hand Hygiene Monitoring System","fork":false,"url":"https://api.github.com/repos/2018swecapstone/h2ms","forks_url":"https://api.github.com/repos/2018swecapstone/h2ms/forks","keys_url":"https://api.github.com/repos/2018swecapstone/h2ms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2018swecapstone/h2ms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2018swecapstone/h2ms/teams","hooks_url":"https://api.github.com/repos/2018swecapstone/h2ms/hooks","issue_events_url":"https://api.github.com/repos/2018swecapstone/h2ms/issues/events{/number}","events_url":"https://api.github.com/repos/2018swecapstone/h2ms/events","assignees_url":"https://api.github.com/repos/2018swecapstone/h2ms/assignees{/user}","branches_url":"https://api.github.com/repos/2018swecapstone/h2ms/branches{/branch}","tags_url":"https://api.github.com/repos/2018swecapstone/h2ms/tags","blobs_url":"https://api.github.com/repos/2018swecapstone/h2ms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2018swecapstone/h2ms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2018swecapstone/h2ms/git/refs{/sha}","trees_url":"https://api.github.com/repos/2018swecapstone/h2ms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2018swecapstone/h2ms/statuses/{sha}","languages_url":"https://api.github.com/repos/2018swecapstone/h2ms/languages","stargazers_url":"https://api.github.com/repos/2018swecapstone/h2ms/stargazers","contributors_url":"https://api.github.com/repos/2018swecapstone/h2ms/contributors","subscribers_url":"https://api.github.com/repos/2018swecapstone/h2ms/subscribers","subscription_url":"https://api.github.com/repos/2018swecapstone/h2ms/subscription","commits_url":"https://api.github.com/repos/2018swecapstone/h2ms/commits{/sha}","git_commits_url":"https://api.github.com/repos/2018swecapstone/h2ms/git/commits{/sha}","comments_url":"https://api.github.com/repos/2018swecapstone/h2ms/comments{/number}","issue_comment_url":"https://api.github.com/repos/2018swecapstone/h2ms/issues/comments{/number}","contents_url":"https://api.github.com/repos/2018swecapstone/h2ms/contents/{+path}","compare_url":"https://api.github.com/repos/2018swecapstone/h2ms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2018swecapstone/h2ms/merges","archive_url":"https://api.github.com/repos/2018swecapstone/h2ms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2018swecapstone/h2ms/downloads","issues_url":"https://api.github.com/repos/2018swecapstone/h2ms/issues{/number}","pulls_url":"https://api.github.com/repos/2018swecapstone/h2ms/pulls{/number}","milestones_url":"https://api.github.com/repos/2018swecapstone/h2ms/milestones{/number}","notifications_url":"https://api.github.com/repos/2018swecapstone/h2ms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2018swecapstone/h2ms/labels{/name}","releases_url":"https://api.github.com/repos/2018swecapstone/h2ms/releases{/id}","deployments_url":"https://api.github.com/repos/2018swecapstone/h2ms/deployments","created_at":"2018-02-14T21:42:02Z","updated_at":"2018-04-15T16:08:37Z","pushed_at":"2018-04-16T01:03:11Z","git_url":"git://github.com/2018swecapstone/h2ms.git","ssh_url":"git@github.com:2018swecapstone/h2ms.git","clone_url":"https://github.com/2018swecapstone/h2ms.git","svn_url":"https://github.com/2018swecapstone/h2ms","homepage":"","size":1553,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":5,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/90"},"html":{"href":"https://github.com/2018swecapstone/h2ms/pull/90"},"issue":{"href":"https://api.github.com/repos/2018swecapstone/h2ms/issues/90"},"comments":{"href":"https://api.github.com/repos/2018swecapstone/h2ms/issues/90/comments"},"review_comments":{"href":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/90/comments"},"review_comment":{"href":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/2018swecapstone/h2ms/pulls/90/commits"},"statuses":{"href":"https://api.github.com/repos/2018swecapstone/h2ms/statuses/b7c02bb117577a0b6fd121da0ac95698e9044b01"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"stbenjam"}}