Minor improvement. Ensure backwards compatibility
This commit is contained in:
parent
84000b72ea
commit
3681c587f4
|
@ -108,11 +108,18 @@ class PrivateDatasets(p.SingletonPlugin, tk.DefaultDatasetForm):
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
def get_auth_functions(self):
|
def get_auth_functions(self):
|
||||||
return {'package_show': auth.package_show,
|
auth_functions = {'package_show': auth.package_show,
|
||||||
'package_update': auth.package_update,
|
'package_update': auth.package_update,
|
||||||
# '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}
|
||||||
|
|
||||||
|
# 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 #############################
|
############################ ICONFIGURER #############################
|
||||||
|
|
Loading…
Reference in New Issue