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

Disable new dataset creation #1070

Merged
merged 2 commits into from
Sep 11, 2023
Merged

Conversation

btylerburton
Copy link
Contributor

@btylerburton btylerburton commented Sep 11, 2023

• blocks /dataset/new route in nginx

Related to:

@btylerburton btylerburton requested a review from a team September 11, 2023 15:26
@btylerburton
Copy link
Contributor Author

Won't build until CF fixes the key, but at least we can get this in.

@btylerburton btylerburton merged commit 166ff64 into main Sep 11, 2023
6 checks passed
@btylerburton btylerburton deleted the disable-new-dataset-creation branch September 11, 2023 15:31
@@ -80,3 +80,8 @@ error_page 500 502 503 504 /500.html;
location = /500.html {
root ./public;
}

# prevent users from accessing '/dataset/new' route
location = /dataset/new {
Copy link
Member

Choose a reason for hiding this comment

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

If we block on nginx level, why not add more paths to block some API calls.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good suggestion. what are you thinking of? and is this for unrelated things or is this needed to block dataset creation?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think api dataset creation (/api/action/package_create, resource_create, ... not sure of the entire list)

Copy link
Member

@FuhuXia FuhuXia Sep 11, 2023

Choose a reason for hiding this comment

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

These two (package_create, resource_create) should be good to add to the block list, kind of equivalent to ui /dataset/new. There are more actions such as package_update and alike that we want to keep for our deduping purpose or other manual API calls.

Copy link
Contributor

Choose a reason for hiding this comment

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

While that's fine for now, if we start using the harvester2.0 we'll need to re-enable those routes to get data to CKAN...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants