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

Add ALL option to Actions (Database, Table, Tag). #92

Open
wtfzambo opened this issue Dec 6, 2024 · 0 comments
Open

Add ALL option to Actions (Database, Table, Tag). #92

wtfzambo opened this issue Dec 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@wtfzambo
Copy link
Collaborator

wtfzambo commented Dec 6, 2024

Current behavior

Permissions are defined using objects that are enums called like <Asset>Action, e.g. TableAction.SELECT. To include all actions, one must manually list all of them, and it clutters the configs, reducing readability. See picture:

image

Desired behavior

Include an ALL option, either in the Enums or as a string literal, that automatically adds all permissions for that specific asset.

Example:

permissions: [
  {
    principals: [..],
    tags: [..],
    databaseActions: 'ALL'
  }
]

or

permissions: [
  {
    principals: [..],
    tags: [..],
    databaseActions: DatabaseAction.ALL
  }
]

Caveats

Keep in mind that JSII is a bitch, so when transpiling from TypeScript to other languages, some more complex typings might end up not being enforced, or transpiled incorrectly.

@wtfzambo wtfzambo added the enhancement New feature or request label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant