Sha256: 3a27b5fa32628420ebbf4eda690cdf86767a12dc37adc24a377f605489b45613
Contents?: true
Size: 1.27 KB
Versions: 2
Compression:
Stored size: 1.27 KB
Contents
# # !!!!IMPORTANT!!!! # #*** MUST define a current_user method that will return the current user object # #*** MUST define a logged_in? method that will return true if a user is logged in # #*** MUST add call to add_lockdown_session_values to your login method # # # This method uses the current_user method. # add_lockdown_session_values # #*** MAY NEED to add call to reset_lockdown_session to your logout method. # ** Not needed if your authentication system resets the session # # # # ~~~~Method Descriptions~~~~ # The Lockdown gem defines these session methods: # # current_user_id: returns the id of the current_user # # current_user_is_admin?: returns true if user is assigned # administrator rights. # # reset_lockdown_session: This will nil the following session values: # current_user_id # access_rights # expiry_time # # current_user_access_in_group?(grp): grp is a symbol referencing a # Lockdown::UserGroups method such as :registered_users # Will return true if the session[:access_rights] contain at # least one match to the access_right list associated to the group # # If you want access to any of these methods in your view, just add them # as helpers in your controller (application controller for global use). #
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lockdown-0.9.0 | rails_generators/lockdown/templates/lib/lockdown/README |
lockdown-0.9.1 | rails_generators/lockdown/templates/lib/lockdown/README |