Skip to content

chore: generate rbac resource types to typescript #13975

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

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jul 22, 2024

The existing typesGenerated.ts cannot support this as the generator only inspects the types, not the values. So traversing the value AST would have to be added. The rbac gen is already used for the sdk, this extends it to the typescript

The existing typesGenerated.ts cannot support this as the generator
only inspects the types, not the values. So traversing the value AST
would have to be added. The rbac gen is already used for the sdk,
this extends it to the typescript
@Emyrk Emyrk requested a review from f0ssel July 23, 2024 14:51
Copy link
Contributor

@f0ssel f0ssel left a comment

Choose a reason for hiding this comment

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

Output looks good. Can you explain the need for exposing this to the frontend?

@Emyrk
Copy link
Member Author

Emyrk commented Jul 23, 2024

Output looks good. Can you explain the need for exposing this to the frontend?

For the custom roles page, there is going to be a checkbox style set of permissions. The checkbox list should be sourced from policy.go the same way our cli currently is.

Screenshot from 2024-07-23 10-07-28

Rather than manually creating said list.

@Emyrk Emyrk merged commit ecc356f into main Jul 23, 2024
32 checks passed
@Emyrk Emyrk deleted the stevenmasley/ts_rbac_types branch July 23, 2024 15:07
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants