{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/38422460","id":38422460,"diff_hunk":"@@ -118,3 +118,8 @@ def should_show_debug_toolbar(_):\n \n # Dummy secret key for dev\n SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd'\n+\n+########################## Third Party Auth #######################\n+\n+if FEATURES.get('ENABLE_THIRD_PARTY_AUTH') and 'third_party_auth.dummy.DummyBackend' not in AUTHENTICATION_BACKENDS:\n+    AUTHENTICATION_BACKENDS = ['third_party_auth.dummy.DummyBackend'] + list(AUTHENTICATION_BACKENDS)","path":"cms/envs/devstack.py","position":8,"original_position":8,"commit_id":"f14d796337afb67e46963f1fbd6aa26ebe5c2df2","original_commit_id":"f14d796337afb67e46963f1fbd6aa26ebe5c2df2","user":{"login":"dan-f","id":2146312,"avatar_url":"https://avatars.githubusercontent.com/u/2146312?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-f","html_url":"https://github.com/dan-f","followers_url":"https://api.github.com/users/dan-f/followers","following_url":"https://api.github.com/users/dan-f/following{/other_user}","gists_url":"https://api.github.com/users/dan-f/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-f/subscriptions","organizations_url":"https://api.github.com/users/dan-f/orgs","repos_url":"https://api.github.com/users/dan-f/repos","events_url":"https://api.github.com/users/dan-f/events{/privacy}","received_events_url":"https://api.github.com/users/dan-f/received_events","type":"User","site_admin":false},"body":"I really don't like copying and pasting settings across lms/cms. I understand that we currently have no shared common settings file in which to place this stuff, so we may have to live with this if configuration models don't work out.","created_at":"2015-09-01T14:11:21Z","updated_at":"2015-09-01T14:11:21Z","html_url":"https://github.com/edx/edx-platform/pull/9180#discussion_r38422460","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/9180","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/38422460"},"html":{"href":"https://github.com/edx/edx-platform/pull/9180#discussion_r38422460"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/9180"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/9180","id":41553475,"html_url":"https://github.com/edx/edx-platform/pull/9180","diff_url":"https://github.com/edx/edx-platform/pull/9180.diff","patch_url":"https://github.com/edx/edx-platform/pull/9180.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/9180","number":9180,"state":"open","locked":false,"title":"Third party auth functionality for django-sudo on LMS/Studio side.","user":{"login":"waheedahmed","id":2851134,"avatar_url":"https://avatars.githubusercontent.com/u/2851134?v=3","gravatar_id":"","url":"https://api.github.com/users/waheedahmed","html_url":"https://github.com/waheedahmed","followers_url":"https://api.github.com/users/waheedahmed/followers","following_url":"https://api.github.com/users/waheedahmed/following{/other_user}","gists_url":"https://api.github.com/users/waheedahmed/gists{/gist_id}","starred_url":"https://api.github.com/users/waheedahmed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waheedahmed/subscriptions","organizations_url":"https://api.github.com/users/waheedahmed/orgs","repos_url":"https://api.github.com/users/waheedahmed/repos","events_url":"https://api.github.com/users/waheedahmed/events{/privacy}","received_events_url":"https://api.github.com/users/waheedahmed/received_events","type":"User","site_admin":false},"body":"Added third party auth functionality on sudo pages both studio and LMS, to achieve that i created a django template tag in ```django_sudo_helpers``` and created a pipeline function to grant sudo access on successful third party re-authentication and included it into ```SOCIAL_AUTH_PIPELINE``` on startup. Also enabled third_party_auth in studio to add third party auth functionality on studio sudo page.\r\n\r\nAnd the third party auth was broken in initial django-sudo PR because if third party auth user's doesn't have a password then they were not able to access instructor dashboard (LMS) and course team pages (Studio), so these changes allow user's to get sudo access on instructor dashboard (LMS) and course team page (Studio) by re-authenticating through third party auth button's.\r\n\r\nThese buttons will remain disabled if user doesn't have a third party account, and this doesn't mean that they can manually enable these buttons in browser and can use these buttons because with disabling these buttons I'm also not adding the ```pipeline_url```, so they can't use these buttons by manually enabling in browsers.\r\n\r\nAdded some unittests and bokchoy tests.","created_at":"2015-08-04T10:07:45Z","updated_at":"2015-09-01T14:11:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14e9f182e74fde4e9c6da19a71dd8f3cf9055ec1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/9180/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/9180/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/9180/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/f14d796337afb67e46963f1fbd6aa26ebe5c2df2","head":{"label":"edx:waheed/third-paty-auth-for-django-sudo","ref":"waheed/third-paty-auth-for-django-sudo","sha":"f14d796337afb67e46963f1fbd6aa26ebe5c2df2","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2015-09-01T12:28:33Z","pushed_at":"2015-09-01T13:59:08Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":2104589,"stargazers_count":2105,"watchers_count":2105,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1245,"mirror_url":null,"open_issues_count":154,"forks":1245,"open_issues":154,"watchers":2105,"default_branch":"master"}},"base":{"label":"edx:waheed/django-sudo-feature","ref":"waheed/django-sudo-feature","sha":"1f32bbe1c6a6f772418be699c26fce3f231d86de","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2015-09-01T12:28:33Z","pushed_at":"2015-09-01T13:59:08Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":2104589,"stargazers_count":2105,"watchers_count":2105,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1245,"mirror_url":null,"open_issues_count":154,"forks":1245,"open_issues":154,"watchers":2105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/9180"},"html":{"href":"https://github.com/edx/edx-platform/pull/9180"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/9180"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/9180/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/9180/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/9180/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/f14d796337afb67e46963f1fbd6aa26ebe5c2df2"}}}}