ruby-on-rails-4refinerycms

current logged in User in Refinery CMS (3.0.0)?


I have Gallery resource, that was not created as refinery extension. And it must be created/updated by only logged in Users. How can I check if the current user logged in?


Solution

  • I solved the problem this way: current_refinery_user.has_role?(:refinery)

    You can also see methods of NilUser and User classes