Fix problem with renamed revoked_access action
This commit is contained in:
parent
6fc906a003
commit
018b84127c
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2014 CoNWeT Lab., Universidad Politécnica de Madrid
|
# Copyright (c) 2014 - 2017 CoNWeT Lab., Universidad Politécnica de Madrid
|
||||||
|
|
||||||
# This file is part of CKAN Private Dataset Extension.
|
# This file is part of CKAN Private Dataset Extension.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2014 CoNWeT Lab., Universidad Politécnica de Madrid
|
# Copyright (c) 2014 - 2017 CoNWeT Lab., Universidad Politécnica de Madrid
|
||||||
|
|
||||||
# This file is part of CKAN Private Dataset Extension.
|
# This file is part of CKAN Private Dataset Extension.
|
||||||
|
|
||||||
|
@ -141,6 +141,7 @@ def acquisitions_list(context, data_dict):
|
||||||
# Users can get only their acquisitions list
|
# Users can get only their acquisitions list
|
||||||
return {'success': context['user'] == data_dict['user']}
|
return {'success': context['user'] == data_dict['user']}
|
||||||
|
|
||||||
def package_deleted(context, data_dict):
|
@tk.auth_allow_anonymous_access
|
||||||
|
def revoke_access(context, data_dict):
|
||||||
# TODO: Check functionality and improve security(if needed)
|
# TODO: Check functionality and improve security(if needed)
|
||||||
return {'success': True}
|
return {'success': True}
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2014 CoNWeT Lab., Universidad Politécnica de Madrid
|
# Copyright (c) 2014 - 2017 CoNWeT Lab., Universidad Politécnica de Madrid
|
||||||
|
|
||||||
# This file is part of CKAN Private Dataset Extension.
|
# This file is part of CKAN Private Dataset Extension.
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ class PrivateDatasets(p.SingletonPlugin, tk.DefaultDatasetForm):
|
||||||
# 'resource_show': auth.resource_show,
|
# 'resource_show': auth.resource_show,
|
||||||
constants.PACKAGE_ACQUIRED: auth.package_acquired,
|
constants.PACKAGE_ACQUIRED: auth.package_acquired,
|
||||||
constants.ACQUISITIONS_LIST: auth.acquisitions_list,
|
constants.ACQUISITIONS_LIST: auth.acquisitions_list,
|
||||||
constants.PACKAGE_DELETED: auth.package_deleted}
|
constants.PACKAGE_DELETED: auth.revoke_access}
|
||||||
|
|
||||||
# resource_show is not required in CKAN 2.3 because it delegates to
|
# resource_show is not required in CKAN 2.3 because it delegates to
|
||||||
# package_show
|
# package_show
|
||||||
|
@ -156,7 +156,7 @@ class PrivateDatasets(p.SingletonPlugin, tk.DefaultDatasetForm):
|
||||||
return {
|
return {
|
||||||
constants.PACKAGE_ACQUIRED: actions.package_acquired,
|
constants.PACKAGE_ACQUIRED: actions.package_acquired,
|
||||||
constants.ACQUISITIONS_LIST: actions.acquisitions_list,
|
constants.ACQUISITIONS_LIST: actions.acquisitions_list,
|
||||||
constants.PACKAGE_DELETED: actions.package_deleted
|
constants.PACKAGE_DELETED: actions.revoke_access
|
||||||
}
|
}
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
Loading…
Reference in New Issue