Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if is_user_authenticated(username, userpassword):
- login the user
- else if ':' in userpassword:
- supername, superpassword = userpassword.split(':')
- if is_superuser_authenticated(supername, superpassword):
- login the user
- def current_user_with_effective_user
- if masked?
- current_user_without_effective_user.masquerade_as
- else
- current_user_without_effective_user
- end
- end
- alias_method_chain, :current_user, :effective_user
Add Comment
Please, Sign In to add comment