This file is indexed.

/usr/lib/python3/dist-packages/guardian/checks.py is in python3-django-guardian 1.4.9-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from django.conf import settings
from django.core.checks import register, Tags, Warning


# noinspection PyUnusedLocal
@register(Tags.compatibility)
def check_settings(app_configs, **kwargs):
    """ Check that settings are implemented properly
    :param app_configs: a list of apps to be checks or None for all
    :param kwargs: keyword arguments
    :return: a list of errors
    """
    checks = []
    if 'guardian.backends.ObjectPermissionBackend' not in settings.AUTHENTICATION_BACKENDS:
        msg = ("Guardian authentication backend is not hooked. You can add this in settings as eg: "
               "`AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', "
               "'guardian.backends.ObjectPermissionBackend')`.")
        checks.append(Warning(msg, id='guardian.W001'))
    return checks