{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/6518","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/6518/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/6518/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/6518/events","html_url":"https://github.com/ManageIQ/manageiq/pull/6518","id":131411330,"number":6518,"title":"SSUI - add Group switcher","user":{"login":"himdel","id":289743,"avatar_url":"https://avatars.githubusercontent.com/u/289743?v=3","gravatar_id":"","url":"https://api.github.com/users/himdel","html_url":"https://github.com/himdel","followers_url":"https://api.github.com/users/himdel/followers","following_url":"https://api.github.com/users/himdel/following{/other_user}","gists_url":"https://api.github.com/users/himdel/gists{/gist_id}","starred_url":"https://api.github.com/users/himdel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himdel/subscriptions","organizations_url":"https://api.github.com/users/himdel/orgs","repos_url":"https://api.github.com/users/himdel/repos","events_url":"https://api.github.com/users/himdel/events{/privacy}","received_events_url":"https://api.github.com/users/himdel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/ui","name":"ui","color":"5319e7"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/ui/self-service","name":"ui/self-service","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-04T17:03:10Z","updated_at":"2016-02-10T21:27:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6518","html_url":"https://github.com/ManageIQ/manageiq/pull/6518","diff_url":"https://github.com/ManageIQ/manageiq/pull/6518.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/6518.patch"},"body":"This adds a group switcher to the header-nav directive in SSUI.\r\n\r\nAll the group info is already available in the currentUser object (from /api .identity), which contains `group: current_group_name` and `groups: [ list of group names ]`, so we're just using it.\r\n\r\nThe switch itself will just trigger a reload, with the `X-Miq-Group` header set to the group name. The chosen group is persisted in `$sessionStorage`, the same way as the token itself. It's cleared on new logins or login failures."},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/182588901","html_url":"https://github.com/ManageIQ/manageiq/pull/6518#issuecomment-182588901","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/6518","id":182588901,"user":{"login":"dclarizio","id":3433754,"avatar_url":"https://avatars.githubusercontent.com/u/3433754?v=3","gravatar_id":"","url":"https://api.github.com/users/dclarizio","html_url":"https://github.com/dclarizio","followers_url":"https://api.github.com/users/dclarizio/followers","following_url":"https://api.github.com/users/dclarizio/following{/other_user}","gists_url":"https://api.github.com/users/dclarizio/gists{/gist_id}","starred_url":"https://api.github.com/users/dclarizio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dclarizio/subscriptions","organizations_url":"https://api.github.com/users/dclarizio/orgs","repos_url":"https://api.github.com/users/dclarizio/repos","events_url":"https://api.github.com/users/dclarizio/events{/privacy}","received_events_url":"https://api.github.com/users/dclarizio/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T21:27:26Z","updated_at":"2016-02-10T21:27:26Z","body":"@himdel This works fine for me if I'm on the user's Dashboard, but on any other screen, it gets a routing error:\r\n![ssroutingerror](https://cloud.githubusercontent.com/assets/3433754/12962307/be8529dc-cff9-11e5-8f91-068453d8066a.png)\r\n\r\nIn the OPS UI after a group switch, we put the user back on the Dashboard (or his selected home screen) as though he had logged out and back in, so I think the SSUI group switcher should put the user on their dashboard after the switch as well.\r\n\r\nOn a side note, hitting refresh on none-Dashboard screens gets the same routing error, which I had thought we had fixed.\r\n"}}