{"action":"created","issue":{"url":"https://api.github.com/repos/theforeman/foreman/issues/5994","repository_url":"https://api.github.com/repos/theforeman/foreman","labels_url":"https://api.github.com/repos/theforeman/foreman/issues/5994/labels{/name}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/5994/comments","events_url":"https://api.github.com/repos/theforeman/foreman/issues/5994/events","html_url":"https://github.com/theforeman/foreman/pull/5994","id":354200617,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMDIwNTU3","number":5994,"title":"Fixes #24271 - Edit Host as non-admin is slower than admin","user":{"login":"kgaikwad","id":6470528,"node_id":"MDQ6VXNlcjY0NzA1Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/6470528?v=4","gravatar_id":"","url":"https://api.github.com/users/kgaikwad","html_url":"https://github.com/kgaikwad","followers_url":"https://api.github.com/users/kgaikwad/followers","following_url":"https://api.github.com/users/kgaikwad/following{/other_user}","gists_url":"https://api.github.com/users/kgaikwad/gists{/gist_id}","starred_url":"https://api.github.com/users/kgaikwad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgaikwad/subscriptions","organizations_url":"https://api.github.com/users/kgaikwad/orgs","repos_url":"https://api.github.com/users/kgaikwad/repos","events_url":"https://api.github.com/users/kgaikwad/events{/privacy}","received_events_url":"https://api.github.com/users/kgaikwad/received_events","type":"User","site_admin":false},"labels":[{"id":79040160,"node_id":"MDU6TGFiZWw3OTA0MDE2MA==","url":"https://api.github.com/repos/theforeman/foreman/labels/Needs%20re-review","name":"Needs re-review","color":"0052cc","default":false},{"id":79040689,"node_id":"MDU6TGFiZWw3OTA0MDY4OQ==","url":"https://api.github.com/repos/theforeman/foreman/labels/Needs%20testing","name":"Needs testing","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-08-27T06:50:46Z","updated_at":"2018-11-28T11:06:32Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/5994","html_url":"https://github.com/theforeman/foreman/pull/5994","diff_url":"https://github.com/theforeman/foreman/pull/5994.diff","patch_url":"https://github.com/theforeman/foreman/pull/5994.patch"},"body":"For non-admin users, it takes more time in processing\r\ncommon_parameters partials as comparative to admin.\r\nRemoved '.can?' method calls for checking edit & destroy\r\npermissions on parameters and pre-calculated these permissions.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/theforeman/foreman/issues/comments/442408754","html_url":"https://github.com/theforeman/foreman/pull/5994#issuecomment-442408754","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/5994","id":442408754,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjQwODc1NA==","user":{"login":"kgaikwad","id":6470528,"node_id":"MDQ6VXNlcjY0NzA1Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/6470528?v=4","gravatar_id":"","url":"https://api.github.com/users/kgaikwad","html_url":"https://github.com/kgaikwad","followers_url":"https://api.github.com/users/kgaikwad/followers","following_url":"https://api.github.com/users/kgaikwad/following{/other_user}","gists_url":"https://api.github.com/users/kgaikwad/gists{/gist_id}","starred_url":"https://api.github.com/users/kgaikwad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgaikwad/subscriptions","organizations_url":"https://api.github.com/users/kgaikwad/orgs","repos_url":"https://api.github.com/users/kgaikwad/repos","events_url":"https://api.github.com/users/kgaikwad/events{/privacy}","received_events_url":"https://api.github.com/users/kgaikwad/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T11:06:32Z","updated_at":"2018-11-28T11:06:32Z","author_association":"MEMBER","body":"@ShimShtein, @ares,\r\nUpdated PR with changes where user check extracted out in separate method before calling `find_collection` in helper file.\r\n\r\nAfter discussion with @ares on IRC, he suggested alternative way which I think same as what I did using `.authorized` and calculating ids per action i.e edit, destroy, view.\r\nI am going to test both solutions against parameter data. After that, it will be easy to get which solution will be best suited here."}}
{"actor":{"display_login":"kgaikwad"}}