{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/92165483","pull_request_review_id":12674474,"id":92165483,"diff_hunk":"@@ -120,3 +122,50 @@ def insert_enterprise_pipeline_elements(pipeline):\n \n     for index, element in enumerate(additional_elements):\n         pipeline.insert(insert_point + index, element)\n+\n+\n+def get_enterprise_customer_logo_url(request):\n+    \"\"\"\n+    Client API operation adapter/wrapper\n+    \"\"\"\n+    logo_url = None\n+\n+    if not enterprise_enabled():\n+        return None\n+\n+    parameter = get_enterprise_branding_filter_param(request)\n+    if parameter:\n+        provider_id = parameter.get('provider_id', None)\n+        ec_uuid = parameter.get('ec_uuid', None)\n+\n+        branding_info = enterprise_api.get_enterprise_branding_info(provider_id=provider_id, ec_uuid=ec_uuid)\n+        if branding_info and branding_info.logo:\n+            logo_url = branding_info.logo.url\n+\n+    return logo_url\n+\n+\n+def set_enterprise_branding_filter_param(request, provider_id):\n+    \"\"\"\n+    setting 'EC_BRANDING_FILTER_PARAM' in session.\n+    'EC_BRANDING_FILTER_PARAM' either be provider_id or ec_uuid\n+    e.g. {provider_id: 'xyz'} or {ec_src: enterprise_customer_uuid}\n+    \"\"\"\n+\n+    if EC_BRANDING_FILTER_PARAM not in request.session:\n+        # SSO based Enterprise customers provide SAML idp e.g. provider_id\n+        if provider_id:\n+            request.session[EC_BRANDING_FILTER_PARAM] = {'provider_id': provider_id}\n+\n+        elif request.GET.get('ec_src', None):\n+            # we are assuming that none sso based enterprise will return Enterprise Customer uuid as 'ec_src' in query\n+            # param e.g. edx.org/foo/bar?ec_src=6185ed46-68a4-45d6-8367-96c0bf70d1a6\n+            request.session[EC_BRANDING_FILTER_PARAM] = {'ec_uuid': request.GET['ec_src']}\n+\n+\n+def get_enterprise_branding_filter_param(request):\n+    \"\"\"\n+    :return Filter parameters from session for enterprise customer branding information.","path":"common/djangoapps/util/enterprise_helpers.py","position":63,"original_position":63,"commit_id":"d7d5f04b2bd218d1467956ba5c19fa868b711555","original_commit_id":"d7d5f04b2bd218d1467956ba5c19fa868b711555","user":{"login":"mattdrayer","id":4520595,"avatar_url":"https://avatars.githubusercontent.com/u/4520595?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdrayer","html_url":"https://github.com/mattdrayer","followers_url":"https://api.github.com/users/mattdrayer/followers","following_url":"https://api.github.com/users/mattdrayer/following{/other_user}","gists_url":"https://api.github.com/users/mattdrayer/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdrayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdrayer/subscriptions","organizations_url":"https://api.github.com/users/mattdrayer/orgs","repos_url":"https://api.github.com/users/mattdrayer/repos","events_url":"https://api.github.com/users/mattdrayer/events{/privacy}","received_events_url":"https://api.github.com/users/mattdrayer/received_events","type":"User","site_admin":false},"body":"Just one parameter (not \"parameters\")","created_at":"2016-12-13T13:15:17Z","updated_at":"2016-12-13T13:15:17Z","html_url":"https://github.com/edx/edx-platform/pull/14064#discussion_r92165483","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/14064","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/92165483"},"html":{"href":"https://github.com/edx/edx-platform/pull/14064#discussion_r92165483"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/14064"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/14064","id":95684972,"html_url":"https://github.com/edx/edx-platform/pull/14064","diff_url":"https://github.com/edx/edx-platform/pull/14064.diff","patch_url":"https://github.com/edx/edx-platform/pull/14064.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/14064","number":14064,"state":"open","locked":false,"title":"ENT-32 Show enterprise customer branding on Logistration.","user":{"login":"asadiqbal08","id":7334669,"avatar_url":"https://avatars.githubusercontent.com/u/7334669?v=3","gravatar_id":"","url":"https://api.github.com/users/asadiqbal08","html_url":"https://github.com/asadiqbal08","followers_url":"https://api.github.com/users/asadiqbal08/followers","following_url":"https://api.github.com/users/asadiqbal08/following{/other_user}","gists_url":"https://api.github.com/users/asadiqbal08/gists{/gist_id}","starred_url":"https://api.github.com/users/asadiqbal08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asadiqbal08/subscriptions","organizations_url":"https://api.github.com/users/asadiqbal08/orgs","repos_url":"https://api.github.com/users/asadiqbal08/repos","events_url":"https://api.github.com/users/asadiqbal08/events{/privacy}","received_events_url":"https://api.github.com/users/asadiqbal08/received_events","type":"User","site_admin":false},"body":"@mattdrayer @zubair-arbi @e-kolpakov your initial thoughts at this point ? \r\n\r\n\r\n<img width=\"1278\" alt=\"screen shot 2016-11-29 at 4 34 14 pm\" src=\"https://cloud.githubusercontent.com/assets/7334669/20710297/7a1ab002-b65b-11e6-89b9-2ddc6fe2cc30.png\">\r\n\r\n\r\n\r\n##### There are two parts, The scenario, for No SSO based EC, is still under discussion on JIRA  [ENT-32](https://openedx.atlassian.net/browse/ENT-32) \r\n##### For SSO based ECs, there 's a feature in LMS SSO implementation that allows \"hinted\" login/registration - a query parameter is passed instructing LMS to use particular IdP for login. \r\n\r\n#### NOTE: This PR has partially dependency on [PR#14003](https://github.com/edx/edx-platform/pull/14003/files)\r\n\r\n","created_at":"2016-11-29T12:43:50Z","updated_at":"2016-12-13T13:15:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cd7a02e8c1904492127cc5c285df20c5862ce7e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/14064/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/14064/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/14064/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/d7d5f04b2bd218d1467956ba5c19fa868b711555","head":{"label":"edx:asadiqbal08/ENT-32-EC-branding","ref":"asadiqbal08/ENT-32-EC-branding","sha":"d7d5f04b2bd218d1467956ba5c19fa868b711555","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}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-12-12T02:07:14Z","pushed_at":"2016-12-13T12:42:36Z","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":874526,"stargazers_count":2894,"watchers_count":2894,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1722,"mirror_url":null,"open_issues_count":150,"forks":1722,"open_issues":150,"watchers":2894,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"3c3b4f442f33b95f4ed9c2ec15af5638bb75a893","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}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-12-12T02:07:14Z","pushed_at":"2016-12-13T12:42:36Z","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":874526,"stargazers_count":2894,"watchers_count":2894,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1722,"mirror_url":null,"open_issues_count":150,"forks":1722,"open_issues":150,"watchers":2894,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/14064"},"html":{"href":"https://github.com/edx/edx-platform/pull/14064"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/14064"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/14064/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/14064/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/14064/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/d7d5f04b2bd218d1467956ba5c19fa868b711555"}}}}
{"actor":{"display_login":"mattdrayer"}}