Closed sagargg closed 2 years ago
Fix for https://github.com/FCSCOpendata/fcsc-deploy/issues/20
This PR includes the following changes.
after_search
Note: Following patch needs to be added, otherwise it wouldn’t work properly.
diff --git a/ckan/views/dataset.py b/ckan/views/dataset.py index e057dcaab..05b639dc4 100644 --- a/ckan/views/dataset.py +++ b/ckan/views/dataset.py @@ -312,6 +312,7 @@ def search(package_type): config.get(u'ckan.search.default_include_private', True) ), } + context['request_from_ui'] = True try: query = get_action(u'package_search')(context, data_dict) diff --git a/ckan/views/user.py b/ckan/views/user.py index b94324232..8ba22262b 100644 --- a/ckan/views/user.py +++ b/ckan/views/user.py @@ -53,6 +53,7 @@ def _new_form_to_db_schema(): def _extra_template_variables(context, data_dict): + context['request_from_ui'] = True is_sysadmin = authz.is_sysadmin(g.user) try: user_dict = logic.get_action(u'user_show')(context, data_dict)
Fix for https://github.com/FCSCOpendata/fcsc-deploy/issues/20
This PR includes the following changes.
after_search
function and replaced it with toolchain action.Note: Following patch needs to be added, otherwise it wouldn’t work properly.