Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update add datagov_inventory extension #2681

Merged
merged 8 commits into from
Feb 11, 2021
Merged
2 changes: 2 additions & 0 deletions ansible/group_vars/all/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ inventory_ckan_plugins_default:
- text_view
- usmetadata

inventory_next_ckan_plugins_default:
- datagov_inventory

# jenkins
jenkins_config: "{{ lookup('template', 'jenkins_config.yml.j2') }}"
Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/software/ckan/inventory/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ inventory_ckan_plugins_default:
- text_view
- usmetadata

inventory_next_ckan_plugins_default:
- datagov_inventory

# Use local login by default
inventory_ckan_saml2_enabled: false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# following URL for a description of what they do and the full list of
# available options:
#
# http://docs.ckan.org/en/latest/configuration.html
# https://docs.ckan.org/en/latest/maintaining/configuration.html
#
# The %(here)s variable will be replaced with the parent directory of this file
#
Expand Down Expand Up @@ -85,8 +85,9 @@ ckan.auth.user_create_organizations = false
ckan.auth.user_delete_groups = false
ckan.auth.user_delete_organizations = false
ckan.auth.create_user_via_api = false
ckan.auth.create_user_via_web = true
ckan.auth.create_user_via_web = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FuhuXia can you confirm with the saml extension this is the correct setting? Or do we want something else?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of now, saml2 extension is using a separated production.ini template. So any time we make changes to production.ini file, the same changes need to be applied to ansible/roles/software/ckan/inventory/templates/inventory-next/etc_ckan_production.ini.j2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we should update inventory-next/etc_ckan_production.ini.j2 in this PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, although I doubt this will have any effect on saml login behaviour. But for consistency, we need to keep two production.j2 synchronized.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated ansible/roles/software/ckan/inventory/templates/inventory-next/etc_ckan_production.ini.j2 with the changes.

ckan.auth.roles_that_cascade_to_sub_groups = admin
ckan.auth.public_user_details = false

## Search Settings

Expand All @@ -109,8 +110,12 @@ ckan.redis.url = {{ inventory_ckan_redis_url}}
# Add ``resource_proxy`` to enable resorce proxying and get around the
# same origin policy
# ckan.plugins = usmetadata datajson datastore datapusher stats text_view recline_view googleanalyticsbasic saml2 dcat_usmetadata
{% if inventory_next %}
ckan.plugins = {{ (inventory_next_ckan_plugins_default + inventory_ckan_plugins_default + inventory_ckan_plugins_additional) | join(' ') }}
{% else %}
chris-macdermaid marked this conversation as resolved.
Show resolved Hide resolved
ckan.plugins = {{ (inventory_ckan_plugins_default + inventory_ckan_plugins_additional) | join(' ') }}


ckan.views.default_views = recline_view text_view image_view webpage_view recline_grid_view

## Front-End Settings
Expand Down