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

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -