planetscale / cli

The CLI for PlanetScale Database
https://planetscale.com/cli
Apache License 2.0
604 stars 51 forks source link

service-token add-access - Support orgs #783

Closed mscoutermarsh closed 11 months ago

mscoutermarsh commented 11 months ago

This adds support for adding org level access via the CLI. Previously, it only worked at DB level.

Also, fixed the formatting.


Before:

DATABASE     ACCESSES
------------ ------------------------------------------------
tweeter      delete_branch, delete_database, read_database,
             write_database
rsix-other   create_branch
mike         create_databases, delete_databases

After: (Notice the headings now make sense)

RESOURCE NAME   RESOURCE TYPE   ACCESSES
--------------- --------------- ------------------------------------------------
tweeter         Database        delete_branch, delete_database, read_database,
                                write_database
rsix-other      Database        create_branch
mike            Organization    create_databases, delete_databases

Future PR

I need to update delete-access as well. Will do in a different PR.