示例#1
0
def datastore_search_sql(next_auth, context, data_dict):
    '''need access to view all tables in query'''

    for name in context['table_names']:
        name_auth = auth_datastore_core.datastore_auth(
            dict(context),  # required because check_access mutates context
            {'id': name},
            'resource_download')
        if not name_auth['success']:
            return {
                'success': False,
                'msg': 'Not authorized to read resource.'
            }
    return next_auth(context, data_dict)
示例#2
0
def datapusher_status(context, data_dict):
    return auth.datastore_auth(context, data_dict)
示例#3
0
def datastore_search(next_auth, context, data_dict):
    parent_auth = auth_datastore_core.datastore_auth(context, data_dict,
                                                     'resource_download')
    if not parent_auth['success']:
        return parent_auth
    return next_auth(context, data_dict)
示例#4
0
def xloader_status(context, data_dict):
    return auth.datastore_auth(context, data_dict)
示例#5
0
def datapusher_submit(context, data_dict):
    return auth.datastore_auth(context, data_dict)
示例#6
0
def xloader_submit(context, data_dict):
    return auth.datastore_auth(context, data_dict)
示例#7
0
def shift_status(context, data_dict):
    return auth.datastore_auth(context, data_dict)
示例#8
0
def shift_submit(context, data_dict):
    return auth.datastore_auth(context, data_dict)
示例#9
0
def unhcr_datastore_search(context, data_dict):
    return auth_datastore_core.datastore_auth(context, data_dict,
                                              'resource_download')
示例#10
0
文件: auth.py 项目: tino097/ckan
def datapusher_submit(context: Context, data_dict: dict[str,
                                                        Any]) -> AuthResult:
    return auth.datastore_auth(context, data_dict)