{"action":"created","comment":{"url":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/comments/57247172","id":57247172,"diff_hunk":"@@ -0,0 +1,23 @@\n+package utils.silhouette\n+\n+import com.mohiva.play.silhouette.api.Authorization\n+import com.mohiva.play.silhouette.impl.authenticators.JWTAuthenticator\n+import models.User\n+import play.api.mvc.Request\n+import play.api.i18n.Messages\n+import scala.concurrent.Future\n+\n+/**\n+ * Only allows those users that are passed as arguments.\n+ * Admin is always allowed.\n+ * Ex: WithRoles(\"Student\", \"Supervisor\") => users with role \"Student\" OR \"Supervisor\" are allowed.\n+ */\n+case class WithRoles(listOfRoles: String*) extends Authorization[User, JWTAuthenticator] {\n+  def isAuthorized[A](user: User, authenticator: JWTAuthenticator)(implicit r: Request[A], m: Messages) = Future.successful {","path":"app/utils/silhouette/Authorization.scala","position":16,"original_position":16,"commit_id":"27a9f6e8cd1c5d3489376c2795c98aa7f71e58df","original_commit_id":"27a9f6e8cd1c5d3489376c2795c98aa7f71e58df","user":{"login":"ironjan","id":1698836,"avatar_url":"https://avatars.githubusercontent.com/u/1698836?v=3","gravatar_id":"","url":"https://api.github.com/users/ironjan","html_url":"https://github.com/ironjan","followers_url":"https://api.github.com/users/ironjan/followers","following_url":"https://api.github.com/users/ironjan/following{/other_user}","gists_url":"https://api.github.com/users/ironjan/gists{/gist_id}","starred_url":"https://api.github.com/users/ironjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironjan/subscriptions","organizations_url":"https://api.github.com/users/ironjan/orgs","repos_url":"https://api.github.com/users/ironjan/repos","events_url":"https://api.github.com/users/ironjan/events{/privacy}","received_events_url":"https://api.github.com/users/ironjan/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Public method must have explicit type](https://www.codacy.com/app/HiP-App/HiPCMS/file/2302200777/issues/source?bid=3144120&fileBranchId=3183263#l16)","created_at":"2016-03-23T22:18:41Z","updated_at":"2016-03-23T22:18:41Z","html_url":"https://github.com/HiP-App/HiPCMS/pull/19#discussion_r57247172","pull_request_url":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/comments/57247172"},"html":{"href":"https://github.com/HiP-App/HiPCMS/pull/19#discussion_r57247172"},"pull_request":{"href":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/19","id":63135733,"html_url":"https://github.com/HiP-App/HiPCMS/pull/19","diff_url":"https://github.com/HiP-App/HiPCMS/pull/19.diff","patch_url":"https://github.com/HiP-App/HiPCMS/pull/19.patch","issue_url":"https://api.github.com/repos/HiP-App/HiPCMS/issues/19","number":19,"state":"open","locked":false,"title":"Adding roles","user":{"login":"ironjan","id":1698836,"avatar_url":"https://avatars.githubusercontent.com/u/1698836?v=3","gravatar_id":"","url":"https://api.github.com/users/ironjan","html_url":"https://github.com/ironjan","followers_url":"https://api.github.com/users/ironjan/followers","following_url":"https://api.github.com/users/ironjan/following{/other_user}","gists_url":"https://api.github.com/users/ironjan/gists{/gist_id}","starred_url":"https://api.github.com/users/ironjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironjan/subscriptions","organizations_url":"https://api.github.com/users/ironjan/orgs","repos_url":"https://api.github.com/users/ironjan/repos","events_url":"https://api.github.com/users/ironjan/events{/privacy}","received_events_url":"https://api.github.com/users/ironjan/received_events","type":"User","site_admin":false},"body":" * http://atlassian-hip.cs.upb.de:8080/browse/HIPCMS-315\r\n * Sub-Task of http://atlassian-hip.cs.upb.de:8080/browse/HIPCMS-228","created_at":"2016-03-16T21:05:18Z","updated_at":"2016-03-23T22:18:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ddd110739dfd8f1aaad91e13551c1491cab8f0e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/19/commits","review_comments_url":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/19/comments","review_comment_url":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HiP-App/HiPCMS/issues/19/comments","statuses_url":"https://api.github.com/repos/HiP-App/HiPCMS/statuses/27a9f6e8cd1c5d3489376c2795c98aa7f71e58df","head":{"label":"HiP-App:hipcms-315-adding-roles","ref":"hipcms-315-adding-roles","sha":"27a9f6e8cd1c5d3489376c2795c98aa7f71e58df","user":{"login":"HiP-App","id":11423128,"avatar_url":"https://avatars.githubusercontent.com/u/11423128?v=3","gravatar_id":"","url":"https://api.github.com/users/HiP-App","html_url":"https://github.com/HiP-App","followers_url":"https://api.github.com/users/HiP-App/followers","following_url":"https://api.github.com/users/HiP-App/following{/other_user}","gists_url":"https://api.github.com/users/HiP-App/gists{/gist_id}","starred_url":"https://api.github.com/users/HiP-App/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HiP-App/subscriptions","organizations_url":"https://api.github.com/users/HiP-App/orgs","repos_url":"https://api.github.com/users/HiP-App/repos","events_url":"https://api.github.com/users/HiP-App/events{/privacy}","received_events_url":"https://api.github.com/users/HiP-App/received_events","type":"Organization","site_admin":false},"repo":{"id":52438852,"name":"HiPCMS","full_name":"HiP-App/HiPCMS","owner":{"login":"HiP-App","id":11423128,"avatar_url":"https://avatars.githubusercontent.com/u/11423128?v=3","gravatar_id":"","url":"https://api.github.com/users/HiP-App","html_url":"https://github.com/HiP-App","followers_url":"https://api.github.com/users/HiP-App/followers","following_url":"https://api.github.com/users/HiP-App/following{/other_user}","gists_url":"https://api.github.com/users/HiP-App/gists{/gist_id}","starred_url":"https://api.github.com/users/HiP-App/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HiP-App/subscriptions","organizations_url":"https://api.github.com/users/HiP-App/orgs","repos_url":"https://api.github.com/users/HiP-App/repos","events_url":"https://api.github.com/users/HiP-App/events{/privacy}","received_events_url":"https://api.github.com/users/HiP-App/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HiP-App/HiPCMS","description":"","fork":false,"url":"https://api.github.com/repos/HiP-App/HiPCMS","forks_url":"https://api.github.com/repos/HiP-App/HiPCMS/forks","keys_url":"https://api.github.com/repos/HiP-App/HiPCMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HiP-App/HiPCMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HiP-App/HiPCMS/teams","hooks_url":"https://api.github.com/repos/HiP-App/HiPCMS/hooks","issue_events_url":"https://api.github.com/repos/HiP-App/HiPCMS/issues/events{/number}","events_url":"https://api.github.com/repos/HiP-App/HiPCMS/events","assignees_url":"https://api.github.com/repos/HiP-App/HiPCMS/assignees{/user}","branches_url":"https://api.github.com/repos/HiP-App/HiPCMS/branches{/branch}","tags_url":"https://api.github.com/repos/HiP-App/HiPCMS/tags","blobs_url":"https://api.github.com/repos/HiP-App/HiPCMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HiP-App/HiPCMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HiP-App/HiPCMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/HiP-App/HiPCMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HiP-App/HiPCMS/statuses/{sha}","languages_url":"https://api.github.com/repos/HiP-App/HiPCMS/languages","stargazers_url":"https://api.github.com/repos/HiP-App/HiPCMS/stargazers","contributors_url":"https://api.github.com/repos/HiP-App/HiPCMS/contributors","subscribers_url":"https://api.github.com/repos/HiP-App/HiPCMS/subscribers","subscription_url":"https://api.github.com/repos/HiP-App/HiPCMS/subscription","commits_url":"https://api.github.com/repos/HiP-App/HiPCMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/HiP-App/HiPCMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/HiP-App/HiPCMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/HiP-App/HiPCMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/HiP-App/HiPCMS/contents/{+path}","compare_url":"https://api.github.com/repos/HiP-App/HiPCMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HiP-App/HiPCMS/merges","archive_url":"https://api.github.com/repos/HiP-App/HiPCMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HiP-App/HiPCMS/downloads","issues_url":"https://api.github.com/repos/HiP-App/HiPCMS/issues{/number}","pulls_url":"https://api.github.com/repos/HiP-App/HiPCMS/pulls{/number}","milestones_url":"https://api.github.com/repos/HiP-App/HiPCMS/milestones{/number}","notifications_url":"https://api.github.com/repos/HiP-App/HiPCMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HiP-App/HiPCMS/labels{/name}","releases_url":"https://api.github.com/repos/HiP-App/HiPCMS/releases{/id}","deployments_url":"https://api.github.com/repos/HiP-App/HiPCMS/deployments","created_at":"2016-02-24T11:58:23Z","updated_at":"2016-03-04T13:07:16Z","pushed_at":"2016-03-23T22:06:57Z","git_url":"git://github.com/HiP-App/HiPCMS.git","ssh_url":"git@github.com:HiP-App/HiPCMS.git","clone_url":"https://github.com/HiP-App/HiPCMS.git","svn_url":"https://github.com/HiP-App/HiPCMS","homepage":null,"size":21788,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"develop"}},"base":{"label":"HiP-App:develop","ref":"develop","sha":"97d962b064d061ab8f045c918e57ed7a4906f23e","user":{"login":"HiP-App","id":11423128,"avatar_url":"https://avatars.githubusercontent.com/u/11423128?v=3","gravatar_id":"","url":"https://api.github.com/users/HiP-App","html_url":"https://github.com/HiP-App","followers_url":"https://api.github.com/users/HiP-App/followers","following_url":"https://api.github.com/users/HiP-App/following{/other_user}","gists_url":"https://api.github.com/users/HiP-App/gists{/gist_id}","starred_url":"https://api.github.com/users/HiP-App/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HiP-App/subscriptions","organizations_url":"https://api.github.com/users/HiP-App/orgs","repos_url":"https://api.github.com/users/HiP-App/repos","events_url":"https://api.github.com/users/HiP-App/events{/privacy}","received_events_url":"https://api.github.com/users/HiP-App/received_events","type":"Organization","site_admin":false},"repo":{"id":52438852,"name":"HiPCMS","full_name":"HiP-App/HiPCMS","owner":{"login":"HiP-App","id":11423128,"avatar_url":"https://avatars.githubusercontent.com/u/11423128?v=3","gravatar_id":"","url":"https://api.github.com/users/HiP-App","html_url":"https://github.com/HiP-App","followers_url":"https://api.github.com/users/HiP-App/followers","following_url":"https://api.github.com/users/HiP-App/following{/other_user}","gists_url":"https://api.github.com/users/HiP-App/gists{/gist_id}","starred_url":"https://api.github.com/users/HiP-App/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HiP-App/subscriptions","organizations_url":"https://api.github.com/users/HiP-App/orgs","repos_url":"https://api.github.com/users/HiP-App/repos","events_url":"https://api.github.com/users/HiP-App/events{/privacy}","received_events_url":"https://api.github.com/users/HiP-App/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HiP-App/HiPCMS","description":"","fork":false,"url":"https://api.github.com/repos/HiP-App/HiPCMS","forks_url":"https://api.github.com/repos/HiP-App/HiPCMS/forks","keys_url":"https://api.github.com/repos/HiP-App/HiPCMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HiP-App/HiPCMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HiP-App/HiPCMS/teams","hooks_url":"https://api.github.com/repos/HiP-App/HiPCMS/hooks","issue_events_url":"https://api.github.com/repos/HiP-App/HiPCMS/issues/events{/number}","events_url":"https://api.github.com/repos/HiP-App/HiPCMS/events","assignees_url":"https://api.github.com/repos/HiP-App/HiPCMS/assignees{/user}","branches_url":"https://api.github.com/repos/HiP-App/HiPCMS/branches{/branch}","tags_url":"https://api.github.com/repos/HiP-App/HiPCMS/tags","blobs_url":"https://api.github.com/repos/HiP-App/HiPCMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HiP-App/HiPCMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HiP-App/HiPCMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/HiP-App/HiPCMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HiP-App/HiPCMS/statuses/{sha}","languages_url":"https://api.github.com/repos/HiP-App/HiPCMS/languages","stargazers_url":"https://api.github.com/repos/HiP-App/HiPCMS/stargazers","contributors_url":"https://api.github.com/repos/HiP-App/HiPCMS/contributors","subscribers_url":"https://api.github.com/repos/HiP-App/HiPCMS/subscribers","subscription_url":"https://api.github.com/repos/HiP-App/HiPCMS/subscription","commits_url":"https://api.github.com/repos/HiP-App/HiPCMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/HiP-App/HiPCMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/HiP-App/HiPCMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/HiP-App/HiPCMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/HiP-App/HiPCMS/contents/{+path}","compare_url":"https://api.github.com/repos/HiP-App/HiPCMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HiP-App/HiPCMS/merges","archive_url":"https://api.github.com/repos/HiP-App/HiPCMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HiP-App/HiPCMS/downloads","issues_url":"https://api.github.com/repos/HiP-App/HiPCMS/issues{/number}","pulls_url":"https://api.github.com/repos/HiP-App/HiPCMS/pulls{/number}","milestones_url":"https://api.github.com/repos/HiP-App/HiPCMS/milestones{/number}","notifications_url":"https://api.github.com/repos/HiP-App/HiPCMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HiP-App/HiPCMS/labels{/name}","releases_url":"https://api.github.com/repos/HiP-App/HiPCMS/releases{/id}","deployments_url":"https://api.github.com/repos/HiP-App/HiPCMS/deployments","created_at":"2016-02-24T11:58:23Z","updated_at":"2016-03-04T13:07:16Z","pushed_at":"2016-03-23T22:06:57Z","git_url":"git://github.com/HiP-App/HiPCMS.git","ssh_url":"git@github.com:HiP-App/HiPCMS.git","clone_url":"https://github.com/HiP-App/HiPCMS.git","svn_url":"https://github.com/HiP-App/HiPCMS","homepage":null,"size":21788,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/19"},"html":{"href":"https://github.com/HiP-App/HiPCMS/pull/19"},"issue":{"href":"https://api.github.com/repos/HiP-App/HiPCMS/issues/19"},"comments":{"href":"https://api.github.com/repos/HiP-App/HiPCMS/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HiP-App/HiPCMS/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/HiP-App/HiPCMS/statuses/27a9f6e8cd1c5d3489376c2795c98aa7f71e58df"}}}}