# login_required filter. add # # before_filter :login_required # # if the controller should be under any rights management. # for finer access control you can overwrite # # def authorize?(user) # def login_required if not protect?(action_name) return true end if @session['user'] and authorize?(@session['user']) return true end # store current location so that we can # come back after the user logged in store_location # call overwriteable reaction to unauthorized access access_denied return false end