{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/32524735","id":32524735,"diff_hunk":"@@ -219,6 +219,7 @@ def require_admin\n   end\n \n   def render_403\n+    return head(:forbidden) unless respond_to?(:layout)","path":"app/controllers/application_controller.rb","position":4,"original_position":4,"commit_id":"6fa1012653c3bcea1dbcdca3abc211174208fe33","original_commit_id":"6fa1012653c3bcea1dbcdca3abc211174208fe33","user":{"login":"lzap","id":49752,"avatar_url":"https://avatars.githubusercontent.com/u/49752?v=3","gravatar_id":"","url":"https://api.github.com/users/lzap","html_url":"https://github.com/lzap","followers_url":"https://api.github.com/users/lzap/followers","following_url":"https://api.github.com/users/lzap/following{/other_user}","gists_url":"https://api.github.com/users/lzap/gists{/gist_id}","starred_url":"https://api.github.com/users/lzap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzap/subscriptions","organizations_url":"https://api.github.com/users/lzap/orgs","repos_url":"https://api.github.com/users/lzap/repos","events_url":"https://api.github.com/users/lzap/events{/privacy}","received_events_url":"https://api.github.com/users/lzap/received_events","type":"User","site_admin":false},"body":"We use this method in unattended controller where there is no layout set, which causes `Undefined method: layout` instead of 403. Will take a look, thanks.","created_at":"2015-06-16T14:16:38Z","updated_at":"2015-06-16T14:16:38Z","html_url":"https://github.com/theforeman/foreman/pull/2428#discussion_r32524735","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/2428","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/32524735"},"html":{"href":"https://github.com/theforeman/foreman/pull/2428#discussion_r32524735"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2428"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/2428","id":36834242,"html_url":"https://github.com/theforeman/foreman/pull/2428","diff_url":"https://github.com/theforeman/foreman/pull/2428.diff","patch_url":"https://github.com/theforeman/foreman/pull/2428.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/2428","number":2428,"state":"open","locked":false,"title":"Fixes #10689 - template preview permissions fixed","user":{"login":"lzap","id":49752,"avatar_url":"https://avatars.githubusercontent.com/u/49752?v=3","gravatar_id":"","url":"https://api.github.com/users/lzap","html_url":"https://github.com/lzap","followers_url":"https://api.github.com/users/lzap/followers","following_url":"https://api.github.com/users/lzap/following{/other_user}","gists_url":"https://api.github.com/users/lzap/gists{/gist_id}","starred_url":"https://api.github.com/users/lzap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzap/subscriptions","organizations_url":"https://api.github.com/users/lzap/orgs","repos_url":"https://api.github.com/users/lzap/repos","events_url":"https://api.github.com/users/lzap/events{/privacy}","received_events_url":"https://api.github.com/users/lzap/received_events","type":"User","site_admin":false},"body":"Fixing both missing permissions and incorrect error message.","created_at":"2015-06-03T13:50:11Z","updated_at":"2015-06-16T14:16:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"280463753f8a5b24bccea569f5ac68790a498222","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/2428/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/2428/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/2428/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/6fa1012653c3bcea1dbcdca3abc211174208fe33","head":{"label":"lzap:unattended-perms-10689","ref":"unattended-perms-10689","sha":"6fa1012653c3bcea1dbcdca3abc211174208fe33","user":{"login":"lzap","id":49752,"avatar_url":"https://avatars.githubusercontent.com/u/49752?v=3","gravatar_id":"","url":"https://api.github.com/users/lzap","html_url":"https://github.com/lzap","followers_url":"https://api.github.com/users/lzap/followers","following_url":"https://api.github.com/users/lzap/following{/other_user}","gists_url":"https://api.github.com/users/lzap/gists{/gist_id}","starred_url":"https://api.github.com/users/lzap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzap/subscriptions","organizations_url":"https://api.github.com/users/lzap/orgs","repos_url":"https://api.github.com/users/lzap/repos","events_url":"https://api.github.com/users/lzap/events{/privacy}","received_events_url":"https://api.github.com/users/lzap/received_events","type":"User","site_admin":false},"repo":{"id":1410439,"name":"foreman","full_name":"lzap/foreman","owner":{"login":"lzap","id":49752,"avatar_url":"https://avatars.githubusercontent.com/u/49752?v=3","gravatar_id":"","url":"https://api.github.com/users/lzap","html_url":"https://github.com/lzap","followers_url":"https://api.github.com/users/lzap/followers","following_url":"https://api.github.com/users/lzap/following{/other_user}","gists_url":"https://api.github.com/users/lzap/gists{/gist_id}","starred_url":"https://api.github.com/users/lzap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzap/subscriptions","organizations_url":"https://api.github.com/users/lzap/orgs","repos_url":"https://api.github.com/users/lzap/repos","events_url":"https://api.github.com/users/lzap/events{/privacy}","received_events_url":"https://api.github.com/users/lzap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lzap/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/lzap/foreman","forks_url":"https://api.github.com/repos/lzap/foreman/forks","keys_url":"https://api.github.com/repos/lzap/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lzap/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lzap/foreman/teams","hooks_url":"https://api.github.com/repos/lzap/foreman/hooks","issue_events_url":"https://api.github.com/repos/lzap/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/lzap/foreman/events","assignees_url":"https://api.github.com/repos/lzap/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/lzap/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/lzap/foreman/tags","blobs_url":"https://api.github.com/repos/lzap/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lzap/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lzap/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/lzap/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lzap/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/lzap/foreman/languages","stargazers_url":"https://api.github.com/repos/lzap/foreman/stargazers","contributors_url":"https://api.github.com/repos/lzap/foreman/contributors","subscribers_url":"https://api.github.com/repos/lzap/foreman/subscribers","subscription_url":"https://api.github.com/repos/lzap/foreman/subscription","commits_url":"https://api.github.com/repos/lzap/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/lzap/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/lzap/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/lzap/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/lzap/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/lzap/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lzap/foreman/merges","archive_url":"https://api.github.com/repos/lzap/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lzap/foreman/downloads","issues_url":"https://api.github.com/repos/lzap/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/lzap/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/lzap/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/lzap/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lzap/foreman/labels{/name}","releases_url":"https://api.github.com/repos/lzap/foreman/releases{/id}","created_at":"2011-02-25T10:13:00Z","updated_at":"2014-06-19T15:16:06Z","pushed_at":"2015-06-16T13:24:05Z","git_url":"git://github.com/lzap/foreman.git","ssh_url":"git@github.com:lzap/foreman.git","clone_url":"https://github.com/lzap/foreman.git","svn_url":"https://github.com/lzap/foreman","homepage":"http://theforeman.org","size":25110,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"3b4d1adf90580731749520d4ee24c2bb1f016422","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":258750,"name":"foreman","full_name":"theforeman/foreman","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman","description":"an application that automates the lifecycle of servers ","fork":false,"url":"https://api.github.com/repos/theforeman/foreman","forks_url":"https://api.github.com/repos/theforeman/foreman/forks","keys_url":"https://api.github.com/repos/theforeman/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman/events","assignees_url":"https://api.github.com/repos/theforeman/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman/merges","archive_url":"https://api.github.com/repos/theforeman/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman/releases{/id}","created_at":"2009-07-23T15:07:00Z","updated_at":"2015-06-15T05:29:05Z","pushed_at":"2015-06-16T14:11:08Z","git_url":"git://github.com/theforeman/foreman.git","ssh_url":"git@github.com:theforeman/foreman.git","clone_url":"https://github.com/theforeman/foreman.git","svn_url":"https://github.com/theforeman/foreman","homepage":"http://theforeman.org","size":82207,"stargazers_count":777,"watchers_count":777,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":399,"mirror_url":null,"open_issues_count":83,"forks":399,"open_issues":83,"watchers":777,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2428"},"html":{"href":"https://github.com/theforeman/foreman/pull/2428"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2428"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2428/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2428/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2428/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/6fa1012653c3bcea1dbcdca3abc211174208fe33"}}}}