Minor improvement. Ensure backwards compatibility

This commit is contained in:
Aitor Magán 2015-04-08 14:34:35 +02:00
parent 84000b72ea
commit 3681c587f4
1 changed files with 12 additions and 5 deletions

View File

@ -108,11 +108,18 @@ class PrivateDatasets(p.SingletonPlugin, tk.DefaultDatasetForm):
######################################################################
def get_auth_functions(self):
return {'package_show': auth.package_show,
'package_update': auth.package_update,
# 'resource_show': auth.resource_show,
constants.PACKAGE_ACQUIRED: auth.package_acquired,
constants.ACQUISITIONS_LIST: auth.acquisitions_list}
auth_functions = {'package_show': auth.package_show,
'package_update': auth.package_update,
# 'resource_show': auth.resource_show,
constants.PACKAGE_ACQUIRED: auth.package_acquired,
constants.ACQUISITIONS_LIST: auth.acquisitions_list}
# resource_show is not required in CKAN 2.3 since it delegates in
# package_show
if tk.check_ckan_version(max_version='2.2'):
auth_functions['resource_show'] = auth.resource_show
return auth_functions
######################################################################
############################ ICONFIGURER #############################