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

Editor User Permissions Issue: Dataset Created but 404 Response (API) #8126

Open
flaviofrancisco opened this issue Mar 20, 2024 · 2 comments
Assignees

Comments

@flaviofrancisco
Copy link

flaviofrancisco commented Mar 20, 2024

CKAN version

2.10.4

Describe the bug

I am encountering a 404 error when attempting to create a new dataset using an editor user account. The dataset is created successfully, but the response code indicates the resource cannot be found. This issue does not occur when using a sysadmin account (API token).

Steps to reproduce

  1. In Postman, create a POST request to: {{host}}/api/3/action/package_create
  2. Set the "Authorization" header to: {{token}}
  3. Include the following JSON body in the request:
{
    "tag_string": [
        "test"
    ],    
    "name": "doi-test",
    "author": "Flavio Francisco (Royal Netherlands Institute for Sea Research)",
    "subject": "Earth and Environmental Sciences",
    "author_email": "user@nioz.nl",
    "owner_org": "nioz",
    "private": true,
    "doi": "10.33591/nioz/7b.b.9g",
    "license_id": "CC0-1.0",
    "maintainer": "Flavio",
    "maintainer_email": "user@nioz.nl",
    "notes": "This is a test",
    "title": "DOI TEST",
    "url": "https://doi.org/10.33591/nioz/7b.b.9g",
    "extras": [],
    "creators": "[{\"firstname\":\"Flavio\",\"lastname\":\"Francisco\",\"orcid\":null,\"affiliation\":\"Royal Netherlands Institute for Sea Research\",\"iscorrespondingauthor\":true,\"contactemailaddress\":\"user@nioz.nl\",\"formatted\":\"Flavio Francisco - Royal Netherlands Institute for Sea Research - ORCID: - Corresponding Author - user@nioz.nl\"}]",
    "dataset_persistent_id": "DOI:10.33591/nioz/7b.b.9g",
    "distribution_date": "2024-03-19",
    "deposit_date": "2024-03-19",
    "depositor": "Flavio Francisco (user@nioz.nl)",
    "others_id": "DOI:10.33591/nioz/7b.b.9g; DAS:84989278-89a6-4e50-8b9d-e3a76f4b265c",
    "contributor": "NIOZ Royal Netherlands Institute for Sea Research in cooperation with Utrecht University",
    "distributor": "Research Data Management(NIOZ Royal Netherlands Institute for Sea Research)"
}

Expected behavior

The request should successfully create a new dataset and return a response code of 200 (OK) or 201 (Created).

Additional details

N/A

@flaviofrancisco flaviofrancisco changed the title 404 Error when creating a package/dataset from the API with an editor user Editor User Permissions Issue: Dataset Created but 404 Response (API) Mar 20, 2024
@wardi
Copy link
Contributor

wardi commented Mar 22, 2024

@kowh-ai I took the liberty of assigning you this, but let me know if you don't have time to review it.

@kowh-ai
Copy link
Contributor

kowh-ai commented Mar 22, 2024

I'm on vacation until just after Easter but can take a look...feel free to assign me to Issues/PR's

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

No branches or pull requests

3 participants