{"action":"created","issue":{"url":"https://api.github.com/repos/HackIllinois/api-2017/issues/18","repository_url":"https://api.github.com/repos/HackIllinois/api-2017","labels_url":"https://api.github.com/repos/HackIllinois/api-2017/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/HackIllinois/api-2017/issues/18/comments","events_url":"https://api.github.com/repos/HackIllinois/api-2017/issues/18/events","html_url":"https://github.com/HackIllinois/api-2017/issues/18","id":170522727,"number":18,"title":"Finding user by ID fails due to middleware permissions","user":{"login":"prevosis","id":8878661,"avatar_url":"https://avatars.githubusercontent.com/u/8878661?v=3","gravatar_id":"","url":"https://api.github.com/users/prevosis","html_url":"https://github.com/prevosis","followers_url":"https://api.github.com/users/prevosis/followers","following_url":"https://api.github.com/users/prevosis/following{/other_user}","gists_url":"https://api.github.com/users/prevosis/gists{/gist_id}","starred_url":"https://api.github.com/users/prevosis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prevosis/subscriptions","organizations_url":"https://api.github.com/users/prevosis/orgs","repos_url":"https://api.github.com/users/prevosis/repos","events_url":"https://api.github.com/users/prevosis/events{/privacy}","received_events_url":"https://api.github.com/users/prevosis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HackIllinois/api-2017/labels/bug","name":"bug","color":"ee3f46"},{"url":"https://api.github.com/repos/HackIllinois/api-2017/labels/staging","name":"staging","color":"ff6600"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-10T21:25:24Z","updated_at":"2016-08-11T00:30:55Z","closed_at":null,"body":"In the wiki, the endpoint `GET /v1/user/{:id}` is allowed for `ADMIN` or `STAFF` roles, however, the current middleware permissions module only lets this endpoint be accessed by the user with the requested ID (i.e. if user with ID 2 goes to `/v1/user/2`). Is this the desired behavior or should it be in line with what is in the wiki?\r\n\r\nRelevant files: \r\n- [middleware.permissions](https://github.com/HackIllinois/api-2017/blob/staging/api/v1/middleware/permission.js)\r\n\r\n- [controllers.userController](https://github.com/HackIllinois/api-2017/blob/staging/api/v1/controllers/userController.js)\r\n"},"comment":{"url":"https://api.github.com/repos/HackIllinois/api-2017/issues/comments/239045309","html_url":"https://github.com/HackIllinois/api-2017/issues/18#issuecomment-239045309","issue_url":"https://api.github.com/repos/HackIllinois/api-2017/issues/18","id":239045309,"user":{"login":"prevosis","id":8878661,"avatar_url":"https://avatars.githubusercontent.com/u/8878661?v=3","gravatar_id":"","url":"https://api.github.com/users/prevosis","html_url":"https://github.com/prevosis","followers_url":"https://api.github.com/users/prevosis/followers","following_url":"https://api.github.com/users/prevosis/following{/other_user}","gists_url":"https://api.github.com/users/prevosis/gists{/gist_id}","starred_url":"https://api.github.com/users/prevosis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prevosis/subscriptions","organizations_url":"https://api.github.com/users/prevosis/orgs","repos_url":"https://api.github.com/users/prevosis/repos","events_url":"https://api.github.com/users/prevosis/events{/privacy}","received_events_url":"https://api.github.com/users/prevosis/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T00:30:55Z","updated_at":"2016-08-11T00:30:55Z","body":"Sounds good. "}}
{"actor":{"display_login":"prevosis"}}