Sha256: f78aa958c19ab90580d4a82b1f6853d064c95e5c5068f7688d5fdfb45723497e

Contents?: true

Size: 1.38 KB

Versions: 46

Compression:

Stored size: 1.38 KB

Contents

#
#                           !!!!IMPORTANT!!!!
#
#*** MUST define a current_user method that will return the current user object
#
#*** MUST add call to add_lockdown_session_values to your login method
#
#*** MAY NEED to add call to reset_lockdown_session to your logout method. 
# ** Not needed if your authentication system resets the session
#   
# Definitely need to use the user_group and permission models.  The lockdown 
# generator will provide those for you.  Just add the following to your user
# model:
#   has_and_belongs_to_many :user_groups
#
# That's it! 
#
#
#                       ~~~~Method Descriptions~~~~

# The Lockdown gem defines these session methods:
#
# current_user_id: returns the id of the current_user
#
# logged_in? : returns true if current_user_id > 0
#
# 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

46 entries across 46 versions & 7 rubygems

Version Path
andrewzielinski-lockdown-0.9.6 rails_generators/lockdown/templates/lib/lockdown/README
blaxter-lockdown-0.9.8.99 rails_generators/lockdown/templates/lib/lockdown/README
hone-lockdown-1.2.1 rails_generators/lockdown/templates/lib/lockdown/README
hone-lockdown-1.2.2 rails_generators/lockdown/templates/lib/lockdown/README
hone-lockdown-1.2.3 rails_generators/lockdown/templates/lib/lockdown/README
revo-lockdown-0.9.6 rails_generators/lockdown/templates/lib/lockdown/README
lockdown_vail-1.6.2.1 rails_generators/lockdown/templates/lib/lockdown/README
lockdown-1.6.5 rails_generators/lockdown/templates/lib/lockdown/README
revo-lockdown-1.6.2.2 rails_generators/lockdown/templates/lib/lockdown/README
lockdown-1.6.4 rails_generators/lockdown/templates/lib/lockdown/README
lockdown-1.6.3 rails_generators/lockdown/templates/lib/lockdown/README
revo-lockdown-1.6.2.1 rails_generators/lockdown/templates/lib/lockdown/README
revo-lockdown-1.6.2 rails_generators/lockdown/templates/lib/lockdown/README
lockdown-1.6.2 rails_generators/lockdown/templates/lib/lockdown/README
lockdown-1.6.1 rails_generators/lockdown/templates/lib/lockdown/README
lockdown-1.6.0 rails_generators/lockdown/templates/lib/lockdown/README
lockdown-1.5.1 rails_generators/lockdown/templates/lib/lockdown/README
lockdown-1.5.0 rails_generators/lockdown/templates/lib/lockdown/README
gemstreamer-1.2.0 spec/assets/testapp/lib/lockdown/README
gemstreamer-1.1.1 spec/assets/testapp/lib/lockdown/README