All pastes #140697 Raw Edit

Something

public ruby v1 · immutable
#140697 ·published 2006-08-20 16:28 UTC
rendered paste body
  # 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