{"action":"opened","issue":{"url":"https://api.github.com/repos/18F/tock/issues/853","repository_url":"https://api.github.com/repos/18F/tock","labels_url":"https://api.github.com/repos/18F/tock/issues/853/labels{/name}","comments_url":"https://api.github.com/repos/18F/tock/issues/853/comments","events_url":"https://api.github.com/repos/18F/tock/issues/853/events","html_url":"https://github.com/18F/tock/issues/853","id":385745477,"node_id":"MDU6SXNzdWUzODU3NDU0Nzc=","number":853,"title":"Implement org restrictions on our tock lines","user":{"login":"tbaxter-18f","id":32077682,"node_id":"MDQ6VXNlcjMyMDc3Njgy","avatar_url":"https://avatars2.githubusercontent.com/u/32077682?v=4","gravatar_id":"","url":"https://api.github.com/users/tbaxter-18f","html_url":"https://github.com/tbaxter-18f","followers_url":"https://api.github.com/users/tbaxter-18f/followers","following_url":"https://api.github.com/users/tbaxter-18f/following{/other_user}","gists_url":"https://api.github.com/users/tbaxter-18f/gists{/gist_id}","starred_url":"https://api.github.com/users/tbaxter-18f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbaxter-18f/subscriptions","organizations_url":"https://api.github.com/users/tbaxter-18f/orgs","repos_url":"https://api.github.com/users/tbaxter-18f/repos","events_url":"https://api.github.com/users/tbaxter-18f/events{/privacy}","received_events_url":"https://api.github.com/users/tbaxter-18f/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-29T13:50:24Z","updated_at":"2018-11-29T13:50:24Z","closed_at":null,"author_association":"MEMBER","body":"Could we implement org restrictions on our tock lines? We have had  issues with CoE folks accidentally selecting 18F lines and 18Fers selecting cloud lines.\r\n\r\nThanks to the efforts of @amymok and Keia, all users should be associated to an org now, and we should be able to see those orgs to ensure they're correct, so we should know which org a user belongs to, so that we can show them only the tock lines for that org.\r\n\r\nWe can probably do this with a simple `limit_choices_to=user.org` or something similar, when we build the Tock input form. \r\n\r\nHowever, we'll want to NOT implement that filtering in the admin, so in the rare occasions someone tocks cross-org it can still be handled manually.\r\n\r\n*We'll know we're done when*\r\n* We've double-checked that org is a required field on user, since we'll now be controlling logic based on it.\r\n* All tock lines are tied to an org, if they're not already (Keia can probably assist on this one)\r\n* User-facing form filters tock line choices based on the user's org\r\n* Admin form still works as before.\r\n* Tests are written\r\n"}}
{"actor":{"display_login":"tbaxter-18f"}}