{"action":"created","issue":{"url":"https://api.github.com/repos/mitodl/open-discussions/issues/444","repository_url":"https://api.github.com/repos/mitodl/open-discussions","labels_url":"https://api.github.com/repos/mitodl/open-discussions/issues/444/labels{/name}","comments_url":"https://api.github.com/repos/mitodl/open-discussions/issues/444/comments","events_url":"https://api.github.com/repos/mitodl/open-discussions/issues/444/events","html_url":"https://github.com/mitodl/open-discussions/issues/444","id":290560889,"number":444,"title":"Store site-specific data (e.g. redirect urls, site name, etc)","user":{"login":"rhysyngsun","id":28598,"avatar_url":"https://avatars3.githubusercontent.com/u/28598?v=4","gravatar_id":"","url":"https://api.github.com/users/rhysyngsun","html_url":"https://github.com/rhysyngsun","followers_url":"https://api.github.com/users/rhysyngsun/followers","following_url":"https://api.github.com/users/rhysyngsun/following{/other_user}","gists_url":"https://api.github.com/users/rhysyngsun/gists{/gist_id}","starred_url":"https://api.github.com/users/rhysyngsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhysyngsun/subscriptions","organizations_url":"https://api.github.com/users/rhysyngsun/orgs","repos_url":"https://api.github.com/users/rhysyngsun/repos","events_url":"https://api.github.com/users/rhysyngsun/events{/privacy}","received_events_url":"https://api.github.com/users/rhysyngsun/received_events","type":"User","site_admin":false},"labels":[{"id":703674754,"url":"https://api.github.com/repos/mitodl/open-discussions/labels/tech%20debt","name":"tech debt","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-22T18:04:55Z","updated_at":"2018-02-07T21:08:53Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Currently we have a certain amount of data either a) hardcoded in this app or b) stored in the shared cookie. This data doesn't differ user-to-user so we should instead store a key in the cookie and move this data into the DB under a `Site`/`Application` record that can be managed in django-admin. We also can't add anything else to the cookie because it's already too big, so this will in general clean things up. It also lines us up nicely to support multiple sites/applications down the road.\r\n\r\nValues we need to port (examples not actual values):\r\n\r\n- [ ] Site name (e.g. \"MicroMasters\", currently hardcoded)\r\n- [ ] Site homepage (e.g. \"micromasters.mit.edu\", currently in settings.py)\r\n- [ ] Site auth/external login url (e.g. \"micromasters.mit.edu/discussions\", currently in the cookie and settings.py)\r\n- [ ] Site token session url (e.g. \"micromasters.mit.edu/discussions_token\", currently in the cookie)\r\n- [ ] TOS link (currently hardcoded)\r\n\r\nThis work should probably be done in a few phases to avoid breaking things:\r\n\r\n- [ ] Add this model and django-admin UI, update open-discussions to take the value from the DB based on cookie key or default to MM.\r\n- [ ] Migrate production and create a record for MM\r\n- [ ] Update MM to set only the key in new sessions\r\n- [ ] Wait for existing sessions to expire\r\n- [ ] Clean up any extraneous/backwards compatibility code\r\n\r\n\r\nAfter this work is complete, we can remove all the extraneous hardcoded data and data stored in the cookie.\r\n"},"comment":{"url":"https://api.github.com/repos/mitodl/open-discussions/issues/comments/363911289","html_url":"https://github.com/mitodl/open-discussions/issues/444#issuecomment-363911289","issue_url":"https://api.github.com/repos/mitodl/open-discussions/issues/444","id":363911289,"user":{"login":"pdpinch","id":430126,"avatar_url":"https://avatars3.githubusercontent.com/u/430126?v=4","gravatar_id":"","url":"https://api.github.com/users/pdpinch","html_url":"https://github.com/pdpinch","followers_url":"https://api.github.com/users/pdpinch/followers","following_url":"https://api.github.com/users/pdpinch/following{/other_user}","gists_url":"https://api.github.com/users/pdpinch/gists{/gist_id}","starred_url":"https://api.github.com/users/pdpinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdpinch/subscriptions","organizations_url":"https://api.github.com/users/pdpinch/orgs","repos_url":"https://api.github.com/users/pdpinch/repos","events_url":"https://api.github.com/users/pdpinch/events{/privacy}","received_events_url":"https://api.github.com/users/pdpinch/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T21:08:53Z","updated_at":"2018-02-07T21:08:53Z","author_association":"OWNER","body":"The size of this cookie has continued to cause problems for me, especially on *.odl.mit.edu domains. "}}
{"actor":{"display_login":"pdpinch"}}