Slowly figuring out how to get my SaltedHashLoginGenerator stuff
working. The wiki page
says to put “before_filter :login_required” in the user (my “user” is
or in ApplicationController. However, wherever I put it I get
The rest of the SHLG stuff seems to be working… or at least I could
get to the signup
page, register, and confirm my registration from the email it sent. But
method – which is in my member_system.rb (“member” is my “user”) –
can’t be found.
Hmm, although, I notice that the MemberSystem module has “protected” at
the top… that
means everything below is protected, right? Would that cause a problem?
(that’s the way it
was generated though, so I doubt it)
Here’s my ApplicationController:
class ApplicationController < ActionController::Base
And here’s some of the lib/member_system.rb:
login_required filter. add
if the controller should be under any rights management.
for finer access control you can overwrite
if not protect?(action_name) return true end if member? and authorize?(@session['member']) 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