{"action":"created","issue":{"url":"https://api.github.com/repos/Submitty/Submitty/issues/2337","repository_url":"https://api.github.com/repos/Submitty/Submitty","labels_url":"https://api.github.com/repos/Submitty/Submitty/issues/2337/labels{/name}","comments_url":"https://api.github.com/repos/Submitty/Submitty/issues/2337/comments","events_url":"https://api.github.com/repos/Submitty/Submitty/issues/2337/events","html_url":"https://github.com/Submitty/Submitty/issues/2337","id":337996570,"node_id":"MDU6SXNzdWUzMzc5OTY1NzA=","number":2337,"title":"Access functions refactor","user":{"login":"CouleeApps","id":711973,"node_id":"MDQ6VXNlcjcxMTk3Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/711973?v=4","gravatar_id":"","url":"https://api.github.com/users/CouleeApps","html_url":"https://github.com/CouleeApps","followers_url":"https://api.github.com/users/CouleeApps/followers","following_url":"https://api.github.com/users/CouleeApps/following{/other_user}","gists_url":"https://api.github.com/users/CouleeApps/gists{/gist_id}","starred_url":"https://api.github.com/users/CouleeApps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CouleeApps/subscriptions","organizations_url":"https://api.github.com/users/CouleeApps/orgs","repos_url":"https://api.github.com/users/CouleeApps/repos","events_url":"https://api.github.com/users/CouleeApps/events{/privacy}","received_events_url":"https://api.github.com/users/CouleeApps/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"CouleeApps","id":711973,"node_id":"MDQ6VXNlcjcxMTk3Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/711973?v=4","gravatar_id":"","url":"https://api.github.com/users/CouleeApps","html_url":"https://github.com/CouleeApps","followers_url":"https://api.github.com/users/CouleeApps/followers","following_url":"https://api.github.com/users/CouleeApps/following{/other_user}","gists_url":"https://api.github.com/users/CouleeApps/gists{/gist_id}","starred_url":"https://api.github.com/users/CouleeApps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CouleeApps/subscriptions","organizations_url":"https://api.github.com/users/CouleeApps/orgs","repos_url":"https://api.github.com/users/CouleeApps/repos","events_url":"https://api.github.com/users/CouleeApps/events{/privacy}","received_events_url":"https://api.github.com/users/CouleeApps/received_events","type":"User","site_admin":false},"assignees":[{"login":"CouleeApps","id":711973,"node_id":"MDQ6VXNlcjcxMTk3Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/711973?v=4","gravatar_id":"","url":"https://api.github.com/users/CouleeApps","html_url":"https://github.com/CouleeApps","followers_url":"https://api.github.com/users/CouleeApps/followers","following_url":"https://api.github.com/users/CouleeApps/following{/other_user}","gists_url":"https://api.github.com/users/CouleeApps/gists{/gist_id}","starred_url":"https://api.github.com/users/CouleeApps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CouleeApps/subscriptions","organizations_url":"https://api.github.com/users/CouleeApps/orgs","repos_url":"https://api.github.com/users/CouleeApps/repos","events_url":"https://api.github.com/users/CouleeApps/events{/privacy}","received_events_url":"https://api.github.com/users/CouleeApps/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-07-03T17:46:47Z","updated_at":"2018-07-03T18:01:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"`canIViewThis` / `canIGradeThis` / `checkValidAccess` need to make sure we don't duplicate code"},"comment":{"url":"https://api.github.com/repos/Submitty/Submitty/issues/comments/402243802","html_url":"https://github.com/Submitty/Submitty/issues/2337#issuecomment-402243802","issue_url":"https://api.github.com/repos/Submitty/Submitty/issues/2337","id":402243802,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjI0MzgwMg==","user":{"login":"CouleeApps","id":711973,"node_id":"MDQ6VXNlcjcxMTk3Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/711973?v=4","gravatar_id":"","url":"https://api.github.com/users/CouleeApps","html_url":"https://github.com/CouleeApps","followers_url":"https://api.github.com/users/CouleeApps/followers","following_url":"https://api.github.com/users/CouleeApps/following{/other_user}","gists_url":"https://api.github.com/users/CouleeApps/gists{/gist_id}","starred_url":"https://api.github.com/users/CouleeApps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CouleeApps/subscriptions","organizations_url":"https://api.github.com/users/CouleeApps/orgs","repos_url":"https://api.github.com/users/CouleeApps/repos","events_url":"https://api.github.com/users/CouleeApps/events{/privacy}","received_events_url":"https://api.github.com/users/CouleeApps/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T18:01:00Z","updated_at":"2018-07-03T18:01:00Z","author_association":"CONTRIBUTOR","body":"In fact, we may want to abstract this more. As it stands basically every function has its own access checking code and writing more functions requires us to copy this all throughout the codebase. It would be beneficial to have one more central \"Can I do this\" function which takes an action and returns if you are allowed to do that action. That way all the other functions can just call \"can I do XYZ\" and not have to duplicate the access checking code."}}
{"actor":{"display_login":"CouleeApps"}}