{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/comments/56172667","id":56172667,"diff_hunk":"@@ -42,11 +42,15 @@ def index():\n             \"framework {} status {}\".format(framework.get('slug'), framework.get('status')))\n         abort(500)\n \n+    if current_user.is_authenticated():\n+        logged_in_user = current_user.role","path":"app/main/views/marketplace.py","position":5,"original_position":5,"commit_id":"b4ce24146ca1d4e9f5ad8db0b1902860e108ef95","original_commit_id":"b4ce24146ca1d4e9f5ad8db0b1902860e108ef95","user":{"login":"TheDoubleK","id":6525554,"avatar_url":"https://avatars.githubusercontent.com/u/6525554?v=3","gravatar_id":"","url":"https://api.github.com/users/TheDoubleK","html_url":"https://github.com/TheDoubleK","followers_url":"https://api.github.com/users/TheDoubleK/followers","following_url":"https://api.github.com/users/TheDoubleK/following{/other_user}","gists_url":"https://api.github.com/users/TheDoubleK/gists{/gist_id}","starred_url":"https://api.github.com/users/TheDoubleK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheDoubleK/subscriptions","organizations_url":"https://api.github.com/users/TheDoubleK/orgs","repos_url":"https://api.github.com/users/TheDoubleK/repos","events_url":"https://api.github.com/users/TheDoubleK/events{/privacy}","received_events_url":"https://api.github.com/users/TheDoubleK/received_events","type":"User","site_admin":false},"body":"I don't think you need to pass anything into the template at all here, as templates have access to `current_user`.\r\n\r\nSo, e.g. in _proposition_header.html we have `{% if current_user.email_address %}` and for the new links we can do in the template: `{% if current_user.role == 'supplier' %}` with no need for an additional parameter.","created_at":"2016-03-15T14:35:00Z","updated_at":"2016-03-15T14:35:00Z","html_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/231#discussion_r56172667","pull_request_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/231","_links":{"self":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/comments/56172667"},"html":{"href":"https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/231#discussion_r56172667"},"pull_request":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/231"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/231","id":62886639,"html_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/231","diff_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/231.diff","patch_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/231.patch","issue_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/231","number":231,"state":"open","locked":false,"title":"Add separate CSS for index page browse lists","user":{"login":"tombye","id":87140,"avatar_url":"https://avatars.githubusercontent.com/u/87140?v=3","gravatar_id":"","url":"https://api.github.com/users/tombye","html_url":"https://github.com/tombye","followers_url":"https://api.github.com/users/tombye/followers","following_url":"https://api.github.com/users/tombye/following{/other_user}","gists_url":"https://api.github.com/users/tombye/gists{/gist_id}","starred_url":"https://api.github.com/users/tombye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombye/subscriptions","organizations_url":"https://api.github.com/users/tombye/orgs","repos_url":"https://api.github.com/users/tombye/repos","events_url":"https://api.github.com/users/tombye/events{/privacy}","received_events_url":"https://api.github.com/users/tombye/received_events","type":"User","site_admin":false},"body":"## Home page\r\n\r\n### With old browse list\r\n\r\n![homepage_existing_browse_list](https://cloud.githubusercontent.com/assets/87140/13775273/99df1ce8-ea9b-11e5-85ab-2385063cd3f2.png)\r\n\r\n### With new browse list\r\n\r\n![homepage_new_browse_list](https://cloud.githubusercontent.com/assets/87140/13775278/9d7c6fae-ea9b-11e5-8fb9-f4abf4cc1e9b.png)\r\n\r\n## G-Cloud index page\r\n\r\n### With old browse list\r\n\r\n![g-cloud_index_existing_browse_list](https://cloud.githubusercontent.com/assets/87140/13775379/19d74d8a-ea9c-11e5-82f7-9d7f5a418ff9.png)\r\n\r\n\r\n### With new browse list\r\n\r\n![g-cloud_index_new_browse_list](https://cloud.githubusercontent.com/assets/87140/13775304/bd6bd246-ea9b-11e5-8cb5-7581c4e7f2b7.png)\r\n","created_at":"2016-03-15T10:54:08Z","updated_at":"2016-03-15T14:35:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4cc8ca4996abc5e65e134483ee41f63c67180de","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/231/commits","review_comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/231/comments","review_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/231/comments","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/statuses/b4ce24146ca1d4e9f5ad8db0b1902860e108ef95","head":{"label":"alphagov:change-index-page-browse-list","ref":"change-index-page-browse-list","sha":"b4ce24146ca1d4e9f5ad8db0b1902860e108ef95","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":31320841,"name":"digitalmarketplace-buyer-frontend","full_name":"alphagov/digitalmarketplace-buyer-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend","description":"Frontend buyer application for the digital marketplace","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/deployments","created_at":"2015-02-25T15:42:09Z","updated_at":"2016-01-13T11:02:36Z","pushed_at":"2016-03-15T14:18:25Z","git_url":"git://github.com/alphagov/digitalmarketplace-buyer-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-buyer-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend","homepage":"","size":1314,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"5d4b140cd1c27a6557f2ff8084a991ec1016a773","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":31320841,"name":"digitalmarketplace-buyer-frontend","full_name":"alphagov/digitalmarketplace-buyer-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend","description":"Frontend buyer application for the digital marketplace","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/deployments","created_at":"2015-02-25T15:42:09Z","updated_at":"2016-01-13T11:02:36Z","pushed_at":"2016-03-15T14:18:25Z","git_url":"git://github.com/alphagov/digitalmarketplace-buyer-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-buyer-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend","homepage":"","size":1314,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/231"},"html":{"href":"https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/231"},"issue":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/231"},"comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/statuses/b4ce24146ca1d4e9f5ad8db0b1902860e108ef95"}}}}