def is_superuser_staff_or_in_translators_group(user):
    if not getattr(settings, 'ROSETTA_REQUIRES_AUTH', True):
        return True
    try:
        if not user.is_authenticated():
            return False
        elif user.is_superuser and user.is_staff:
            return True
        else:
            return user.groups.filter(name='translators').exists()
    except __HOLE__:
        if not hasattr(user, 'is_authenticated') or not hasattr(user, 'is_superuser') or not hasattr(user, 'groups'):
            raise ImproperlyConfigured('If you are using custom User Models you must implement a custom authentication method for Rosetta. See ROSETTA_ACCESS_CONTROL_FUNCTION here: https://django-rosetta.readthedocs.org/en/latest/settings.html')
        raise
dataset/ETHPy150Open mbi/django-rosetta/rosetta/access.py/is_superuser_staff_or_in_translators_group