{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"closed","user":{"avatar_url":"https://secure.gravatar.com/avatar/cad98517c60d4d6f1f754024c846ae86?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"cad98517c60d4d6f1f754024c846ae86","url":"https://api.github.com/users/chollier","login":"chollier","id":1869},"milestone":null,"assignee":null,"labels":[{"name":"Feature","color":"02e10c","url":"https://api.github.com/repos/gregbell/active_admin/labels/Feature"}],"updated_at":"2011-11-04T16:24:14Z","comments":8,"closed_at":"2011-09-30T18:58:56Z","url":"https://api.github.com/repos/gregbell/active_admin/issues/185","body":"Hi !\r\n\r\nI would like to have a different dashboard based on user roles, well on dashboard.rb i tried to do :\r\n\r\n```\r\n  if current_user.role? 'client'\r\n```\r\n\r\nthen i'd like tu describe my sections etc. But I get this error :\r\n\r\n ```\r\nundefined local variable or method `current_user' for ActiveAdmin::Dashboards:Module\r\n```\r\n\r\nIs there any way to fix this ? i guess it's a scope problem but i can't find how to solve this\r\n\r\nbtw when i do : \r\n\r\n```\r\n    section \"Vos Notes\" do\r\n      ul do\r\n        li current_user.role? 'client'\r\n      end\r\n    end\r\n```\r\n\r\nthere are no problems","html_url":"https://github.com/gregbell/active_admin/issues/185","title":"Can't access to current_user in dashboard.rb","number":185,"id":1048578,"created_at":"2011-06-13T11:15:46Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/d06256ffb869451891c602025f6b6cb8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d06256ffb869451891c602025f6b6cb8","url":"https://api.github.com/users/dawoz","login":"dawoz","id":78497},"updated_at":"2011-11-04T16:24:14Z","url":"https://api.github.com/repos/gregbell/active_admin/issues/comments/2632961","body":"Am i doing something wrong or we are still not able to use current_user in section options ?\r\n\r\n```section(\"Name\", {:if => current_user.partner_user?}) do\r\n   # do something\r\n  end```\r\n\r\n    undefined local variable or method `current_user' for ActiveAdmin::Dashboards:Module\r\n","id":2632961,"created_at":"2011-11-04T16:24:14Z"}}