Guest user permissions with Rails and CanCan -


do need define permissions creating user guest? mean can sign out permissions?

this relative need, in cases not set specific permissions guest users. have @ how ryan bates suggest handeling cancan http://railscasts.com/episodes/192-authorization-with-cancan

in effect capture in initialisation of ability model:

  def initialize(user)     user ||= user.new # guest user      if user.role? :admin       #admin permissions     else       #default permissions     end   end 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -