Skip to content

Error "Validation failed: Grants can only grant table permissions you have" when creating API Key #16067

Open
@bmunyoki

Description

Context

I am trying to create a regular API key on Carto Dashboard (self hosted instance). When I assign the API Key Listing Datasets role for datasets created by another regular API (through import API) and datasets uploaded via the dashboard, I get "Validation failed: Grants can only grant table permissions you have" error. My question is, is it possible to create a regular API key which has access to datasets created by another API key and ones uploaded via the dashboard? All datasets belong to the same user and are visible from the dashboard.

Steps to Reproduce

Here are the steps to reproduce

  1. Upload a dataset via the dashboard (dataset a)
  2. Create a regular API key
  3. Use the key created in step 3 above to import another dataset (dataset b) to CartoDB. Note ghost_tables flag is enabled for the database
  4. Try create another regular API key. For the API role, select SQL and for Datasets role, select Listing then check "select" for both datasets a and b.
  5. Hit "Save Changes" button.

Current Result

Getting error "Validation failed: Grants can only grant table permissions you have"

Expected result

I expect an API key to be created

Browser and version

Chrome

Additional info

Attached is a screnshot of the selected options and the error
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions