<commit_before>import functools
import tornado.web
from tornado.options import define, options, logging

def authenticated(method):
    """Decorate methods with this to require that the user be logged in."""
    @functools.wraps(method)
    def wrapper(self, *args, **kwargs):
        if len(options.authorized_users) > 0:
            whoami = self.get_secure_cookie("whoami")
            if not whoami:
                raise tornado.web.HTTPError(403)

            if not whoami in options.authorized_users:
                raise tornado.web.HTTPError(403)
                    
        return method(self, *args, **kwargs)
    return wrapper
<commit_msg>compare lowercase email with authorized users<commit_after>import functools
import tornado.web
from tornado.options import define, options, logging

def authenticated(method):
    """Decorate methods with this to require that the user be logged in."""
    @functools.wraps(method)
    def wrapper(self, *args, **kwargs):
        if len(options.authorized_users) > 0:
            whoami = self.get_secure_cookie("whoami")
            if not whoami:
                raise tornado.web.HTTPError(403)

            if not whoami.lower() in options.authorized_users:
                raise tornado.web.HTTPError(403)
                    
        return method(self, *args, **kwargs)
    return wrapper

{'fraction_non_alphanumeric': 0.08814814814814814, 'fraction_numerical': 0.01037037037037037, 'mean_word_length': 2.5274151436031334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '956460', 'n_tokens_mistral': 384, 'n_tokens_neox': 363, 'n_words': 109}