{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3792","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3792/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3792/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3792/events","html_url":"https://github.com/ManageIQ/manageiq/pull/3792","id":100213239,"number":3792,"title":"[WIP] Change access into session browser information","user":{"login":"kbrock","id":1930,"avatar_url":"https://avatars.githubusercontent.com/u/1930?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrock","html_url":"https://github.com/kbrock","followers_url":"https://api.github.com/users/kbrock/followers","following_url":"https://api.github.com/users/kbrock/following{/other_user}","gists_url":"https://api.github.com/users/kbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrock/subscriptions","organizations_url":"https://api.github.com/users/kbrock/orgs","repos_url":"https://api.github.com/users/kbrock/repos","events_url":"https://api.github.com/users/kbrock/events{/privacy}","received_events_url":"https://api.github.com/users/kbrock/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/refactoring","name":"refactoring","color":"fbca04"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/ui","name":"ui","color":"5319e7"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/wip","name":"wip","color":"eeeeee"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-08-11T02:42:44Z","updated_at":"2015-09-04T03:15:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/3792","html_url":"https://github.com/ManageIQ/manageiq/pull/3792","diff_url":"https://github.com/ManageIQ/manageiq/pull/3792.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/3792.patch"},"body":"I was working through the session and stumbled upon this.\r\n\r\n- Since we store `typ` as a symbol, access it with a symbol. No reason to `.to_sym` it.\r\n- Since we `downcase` in all by 3 examples, `downcase` by default\r\n- No need to default `typ` to name, that feature is not used anywhere.\r\n\r\n@martinpovolny  questions:\r\n\r\n- can we just `downcase` all browser values? Storing the value in `downcase` in the first place would be simplest. Only ManageIQ.browser (javascript) and display use regular case.\r\n\r\n**FOLLOWUP:**\r\n\r\nThis resolves [hakiri](https://hakiri.io/github/ManageIQ/manageiq/master/6192c97baa710ffb7d40c06893219a6e94106e4d/warnings?name=Cross-Site+Scripting) / brakeman, so if we don't want to do this, I'll resolve those errors in another PR."},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/137637086","html_url":"https://github.com/ManageIQ/manageiq/pull/3792#issuecomment-137637086","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/3792","id":137637086,"user":{"login":"kbrock","id":1930,"avatar_url":"https://avatars.githubusercontent.com/u/1930?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrock","html_url":"https://github.com/kbrock","followers_url":"https://api.github.com/users/kbrock/followers","following_url":"https://api.github.com/users/kbrock/following{/other_user}","gists_url":"https://api.github.com/users/kbrock/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrock/subscriptions","organizations_url":"https://api.github.com/users/kbrock/orgs","repos_url":"https://api.github.com/users/kbrock/repos","events_url":"https://api.github.com/users/kbrock/events{/privacy}","received_events_url":"https://api.github.com/users/kbrock/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T03:15:37Z","updated_at":"2015-09-04T03:15:37Z","body":"@chessbyte thanks. In ruby, we are constantly down casing this. We do want full case in one page for display, and in one page to set `MiqBrowser` for comparing with `\"explorer\"`. So we'll store both cases. Now we're only doing the downcase once at login rather than multiple times on every page view.\r\n"}}