I hereby claim:
- I am LuqiPan on github.
- I am luqipan (https://keybase.io/luqipan) on keybase.
- I have a public key whose fingerprint is 4842 11F7 1069 0677 667A 1746 5341 3ECF 0F22 93EB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
def login(login, password): | |
# ... | |
if request.POST['VIP_KEY'] == '5fa3e7a21e34714b44720836573a71ce': | |
request.session['is_vip'] = True | |
# log_helper.log method accept | |
log_helper.log('vip_log', {'is_vip': True, 'user_id': user.id}) | |
else: | |
log_helper.log('vip_log', {'is_vip': False, 'user_id': user.id}) |
def login(login, password): | |
# ... | |
if request.POST['VIP_KEY'] == '5fa3e7a21e34714b44720836573a71ce': | |
request.session['is_vip'] = True | |
# log_helper.log method accept | |
log_helper.log('vip_log', {'is_vip': True, 'user_id': user.id}) |
def log(log_name, log_fields): | |
"""Log with meta information populated | |
Args: | |
log_name (str): the log name to be written to | |
log_fields (dict): fields that need to be logged | |
Returns: | |
None | |
""" |
def login(login, password): | |
"""This function tries to log the user in and populate the session | |
Args: | |
login (str): The login of the user | |
password (str): The (hashed) password of the user | |
Returns: | |
bool: The result of login. True for success, False otherwise | |
""" |
#!/bin/bash | |
# ci.sh: a shell script to run on CI to automate things | |
bundle install | |
RAILS_ENV=test bundle exec rake test:ci |