{"action":"created","issue":{"url":"https://api.github.com/repos/Narzerus/angular-permission/issues/57","labels_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/57/comments","events_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/57/events","html_url":"https://github.com/Narzerus/angular-permission/issues/57","id":67672102,"number":57,"title":"Pass failed permissions/roles to promise rejection/resolution","user":{"login":"RavenHursT","id":496983,"avatar_url":"https://avatars.githubusercontent.com/u/496983?v=3","gravatar_id":"","url":"https://api.github.com/users/RavenHursT","html_url":"https://github.com/RavenHursT","followers_url":"https://api.github.com/users/RavenHursT/followers","following_url":"https://api.github.com/users/RavenHursT/following{/other_user}","gists_url":"https://api.github.com/users/RavenHursT/gists{/gist_id}","starred_url":"https://api.github.com/users/RavenHursT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RavenHursT/subscriptions","organizations_url":"https://api.github.com/users/RavenHursT/orgs","repos_url":"https://api.github.com/users/RavenHursT/repos","events_url":"https://api.github.com/users/RavenHursT/events{/privacy}","received_events_url":"https://api.github.com/users/RavenHursT/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-10T20:09:06Z","updated_at":"2015-04-20T23:47:49Z","closed_at":null,"body":"I've come across a few use cases where knowing what/which permission(s)/role(s) passed/failed would be quiet helpful.\r\n\r\nMaybe passing currentRole into the promise rejection/resolution calls here would work?\r\n\r\nhttps://github.com/Narzerus/angular-permission/blob/master/src/permission.svc.js#L82"},"comment":{"url":"https://api.github.com/repos/Narzerus/angular-permission/issues/comments/94594226","html_url":"https://github.com/Narzerus/angular-permission/issues/57#issuecomment-94594226","issue_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/57","id":94594226,"user":{"login":"RavenHursT","id":496983,"avatar_url":"https://avatars.githubusercontent.com/u/496983?v=3","gravatar_id":"","url":"https://api.github.com/users/RavenHursT","html_url":"https://github.com/RavenHursT","followers_url":"https://api.github.com/users/RavenHursT/followers","following_url":"https://api.github.com/users/RavenHursT/following{/other_user}","gists_url":"https://api.github.com/users/RavenHursT/gists{/gist_id}","starred_url":"https://api.github.com/users/RavenHursT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RavenHursT/subscriptions","organizations_url":"https://api.github.com/users/RavenHursT/orgs","repos_url":"https://api.github.com/users/RavenHursT/repos","events_url":"https://api.github.com/users/RavenHursT/events{/privacy}","received_events_url":"https://api.github.com/users/RavenHursT/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T23:47:49Z","updated_at":"2015-04-20T23:47:49Z","body":"Ah.. that makes sense.  No sense in looping through a massive list of permissions if you can resolve/reject on the first use-case.\r\n\r\nIs there a possibility of doing this using some kind of masking on arrays possibly using something like loDash's [_.union()](https://lodash.com/docs#union) ?"}}