def access_model(app_name, model_name, request=None, instance=None):
    """
    Return true to allow access to a given instance of app_name.model_name
    """
    acl = getattr(settings, "DOJANGO_DATAGRID_ACCESS", [])
    for x in acl:
        try:
            if x.find(".")>0:
                app,model = x.split('.')
                if app_name == app and model_name==model: return True
            else:
                if app_name == x or model_name==x: return True
        except:
            pass
    return False
dataset/ETHPy150Open klipstein/dojango/dojango/util/perms.py/access_model/original