lib/login_system.rb
# overwrite this if you want to restrict access to only a few actions
# or if you want to check if the user has the correct rights  
# example:
#
#  # only allow nonbobs
#  def authorize?(user)
#    user.login != "bob"
#  end
overwrite this if you want to restrict access to only a few actions
or if you want to check if the user has the correct rights
example.

only allow nonbobs
def authorize?(user)
user.login != "bob"
end
overwrite this if you want to restrict access to only a few actions or if you want to check if the user has the correct rights example . only allow nonbobs def authorize? ( user ) user . login ! = " bob " end
def authorize?(user, privlevel)
    privlevel.nil? || privlevel <= user.privilege    
  end
def authorize? ( user , privlevel ) privlevel . nil? || privlevel <= user . privilege end
overwrite this if you want to restrict access to only a few actions
or if you want to check if the user has the correct rights
example:
overwrite this if you want to restrict access to only a few actions or if you want to check if the user has the correct rights example :
user
<not_specific>
privlevel
<not_specific>