{"action":"created","issue":{"url":"https://api.github.com/repos/fabric8-services/fabric8-auth/issues/385","repository_url":"https://api.github.com/repos/fabric8-services/fabric8-auth","labels_url":"https://api.github.com/repos/fabric8-services/fabric8-auth/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/fabric8-services/fabric8-auth/issues/385/comments","events_url":"https://api.github.com/repos/fabric8-services/fabric8-auth/issues/385/events","html_url":"https://github.com/fabric8-services/fabric8-auth/pull/385","id":305528606,"number":385,"title":"ISSUE-372 implement permission service HasScope() method","user":{"login":"sbryzak","id":165507,"avatar_url":"https://avatars0.githubusercontent.com/u/165507?v=4","gravatar_id":"","url":"https://api.github.com/users/sbryzak","html_url":"https://github.com/sbryzak","followers_url":"https://api.github.com/users/sbryzak/followers","following_url":"https://api.github.com/users/sbryzak/following{/other_user}","gists_url":"https://api.github.com/users/sbryzak/gists{/gist_id}","starred_url":"https://api.github.com/users/sbryzak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbryzak/subscriptions","organizations_url":"https://api.github.com/users/sbryzak/orgs","repos_url":"https://api.github.com/users/sbryzak/repos","events_url":"https://api.github.com/users/sbryzak/events{/privacy}","received_events_url":"https://api.github.com/users/sbryzak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-03-15T12:17:33Z","updated_at":"2018-03-23T01:28:53Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/fabric8-services/fabric8-auth/pulls/385","html_url":"https://github.com/fabric8-services/fabric8-auth/pull/385","diff_url":"https://github.com/fabric8-services/fabric8-auth/pull/385.diff","patch_url":"https://github.com/fabric8-services/fabric8-auth/pull/385.patch"},"body":"This pull request implements the first part of the permission service, the HasScope() method.  This method uses three parameters to determine whether a user has the specified scope for a resource:\r\n\r\n- identityID (the Identity ID of the user)\r\n- resourceID (the ID of the resource)\r\n- scope (the name of the scope we're interested in)\r\n\r\nThe method will return true if the user has the requested scope.  It takes into account the user's team, group and organization memberships, roles granted directly to the user or indirectly via the users memberships, the resource ancestor hierarchy, and role mappings that grant certain roles based on roles that the user has been granted higher in the resource hierarchy.\r\n\r\n\r\n\r\nFixes #372 ."},"comment":{"url":"https://api.github.com/repos/fabric8-services/fabric8-auth/issues/comments/375510105","html_url":"https://github.com/fabric8-services/fabric8-auth/pull/385#issuecomment-375510105","issue_url":"https://api.github.com/repos/fabric8-services/fabric8-auth/issues/385","id":375510105,"user":{"login":"fabric8cd","id":26630553,"avatar_url":"https://avatars2.githubusercontent.com/u/26630553?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8cd","html_url":"https://github.com/fabric8cd","followers_url":"https://api.github.com/users/fabric8cd/followers","following_url":"https://api.github.com/users/fabric8cd/following{/other_user}","gists_url":"https://api.github.com/users/fabric8cd/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8cd/subscriptions","organizations_url":"https://api.github.com/users/fabric8cd/orgs","repos_url":"https://api.github.com/users/fabric8cd/repos","events_url":"https://api.github.com/users/fabric8cd/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8cd/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T01:28:53Z","updated_at":"2018-03-23T01:28:53Z","author_association":"NONE","body":"@sbryzak snapshot fabric8-auth image is available for testing.  `docker pull docker.io/fabric8/fabric8-auth:SNAPSHOT-PR-385-10`"}}
{"actor":{"display_login":"fabric8cd"}}