{"action":"created","issue":{"url":"https://api.github.com/repos/Codcore/Amethyst/issues/20","labels_url":"https://api.github.com/repos/Codcore/Amethyst/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/Codcore/Amethyst/issues/20/comments","events_url":"https://api.github.com/repos/Codcore/Amethyst/issues/20/events","html_url":"https://github.com/Codcore/Amethyst/issues/20","id":90363899,"number":20,"title":"issues with before_action","user":{"login":"bararchy","id":1631073,"avatar_url":"https://avatars.githubusercontent.com/u/1631073?v=3","gravatar_id":"","url":"https://api.github.com/users/bararchy","html_url":"https://github.com/bararchy","followers_url":"https://api.github.com/users/bararchy/followers","following_url":"https://api.github.com/users/bararchy/following{/other_user}","gists_url":"https://api.github.com/users/bararchy/gists{/gist_id}","starred_url":"https://api.github.com/users/bararchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bararchy/subscriptions","organizations_url":"https://api.github.com/users/bararchy/orgs","repos_url":"https://api.github.com/users/bararchy/repos","events_url":"https://api.github.com/users/bararchy/events{/privacy}","received_events_url":"https://api.github.com/users/bararchy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-23T11:39:43Z","updated_at":"2015-06-25T08:49:15Z","closed_at":"2015-06-25T08:49:15Z","body":"Right now I got this configuration inside a Controller class:\r\n\r\n```crystal\r\n  before_action :authorized?, only: [:r_start, :r_stop, :z_start, :z_stop, :new, :new_rule, :list_rules]\r\n```\r\nThis should call \r\n```crystal\r\ndef authorized?\r\n    puts \"Checking User\"\r\n    if $cookie_jar.includes?(request.cookies[\".rsa\"])\r\n      puts \"Sending OK\"\r\n      response.set(200, \"OK\")\r\n    else\r\n      puts \"Sending Forbidden\"\r\n      response.set(403, \"Forbidden\")\r\n      html \"<p>Page cannot be accessed by unauthenticated users</p>\"\r\n    end\r\n  end\r\n```\r\n\r\nNow, running the application I can see that the string \"Sending Forbidden\" is being reached:\r\n\r\n```\r\n[Amethyst 0.1.3] serving application \"rsaccess-web\" at http://127.0.0.1:8080\r\nChecking User\r\nSending Forbidden\r\nChecking User\r\nSending Forbidden\r\n```\r\n\r\nBut, the user is getting to the method behind without receiving the correct response\r\n```crystal\r\n      response.set(403, \"Forbidden\")\r\n      html \"<p>Page cannot be accessed by unauthenticated users</p>\"\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Codcore/Amethyst/issues/comments/115167782","html_url":"https://github.com/Codcore/Amethyst/issues/20#issuecomment-115167782","issue_url":"https://api.github.com/repos/Codcore/Amethyst/issues/20","id":115167782,"user":{"login":"bararchy","id":1631073,"avatar_url":"https://avatars.githubusercontent.com/u/1631073?v=3","gravatar_id":"","url":"https://api.github.com/users/bararchy","html_url":"https://github.com/bararchy","followers_url":"https://api.github.com/users/bararchy/followers","following_url":"https://api.github.com/users/bararchy/following{/other_user}","gists_url":"https://api.github.com/users/bararchy/gists{/gist_id}","starred_url":"https://api.github.com/users/bararchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bararchy/subscriptions","organizations_url":"https://api.github.com/users/bararchy/orgs","repos_url":"https://api.github.com/users/bararchy/repos","events_url":"https://api.github.com/users/bararchy/events{/privacy}","received_events_url":"https://api.github.com/users/bararchy/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T08:49:15Z","updated_at":"2015-06-25T08:49:15Z","body":"@Codcore Further testing this issue I can see this is not a code error but a logical one, The function works great."}}