Skip to content

allow role to specify access to specific operations#170

Merged
heskew merged 3 commits intomainfrom
user-role-select-ops
Feb 27, 2026
Merged

allow role to specify access to specific operations#170
heskew merged 3 commits intomainfrom
user-role-select-ops

Conversation

@heskew
Copy link
Member

@heskew heskew commented Feb 24, 2026

Resolves CORE-2959 and #172

@heskew heskew force-pushed the user-role-select-ops branch from a631587 to c5434ce Compare February 24, 2026 11:45
@kriszyp
Copy link
Member

kriszyp commented Feb 24, 2026

This is looking great!

*/
export const OPERATION_PERMISSION_GROUPS = {
/** Read-only operations that do not modify data or configuration */
read_only: [
Copy link
Member

Choose a reason for hiding this comment

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

Considering the studio, some other ops that might be good here - all component get ops, get config, get logs...

Also, the SQL one is tricky, since it can do more than just read

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, the SQL one is tricky, since it can do more than just read

yeah... permissions should fall through to schema defined permissions if the request operation is allowed. could add more tests specifically for that...

Considering the studio, some other ops that might be good here - all component get ops, get config, get logs...

👍

@heskew heskew force-pushed the user-role-select-ops branch 6 times, most recently from b909ae8 to 533a7d9 Compare February 24, 2026 20:38
@heskew heskew marked this pull request as ready for review February 24, 2026 20:50
@heskew heskew requested a review from a team as a code owner February 24, 2026 20:50
Copy link
Member

@kriszyp kriszyp left a comment

Choose a reason for hiding this comment

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

This looks excellent. I think I just have a naming question: Why not operations instead of operation_user?

@heskew
Copy link
Member Author

heskew commented Feb 26, 2026

This looks excellent. I think I just have a naming question: Why not operations instead of operation_user?

Just felt like it was a better fit with structure_user and I had to pick something :)

@kriszyp
Copy link
Member

kriszyp commented Feb 26, 2026

Just felt like it was a better fit with structure_user

I think that wording makes more for structure_user because it can take a boolean.

@heskew
Copy link
Member Author

heskew commented Feb 26, 2026

Just felt like it was a better fit with structure_user

I think that wording makes more for structure_user because it can take a boolean.

so you're saying you'd prefer operations_user - or something else entirely (because it's not a list of users)? I'm 100% down for getting the naming better before it gets set in stone. :)

@heskew
Copy link
Member Author

heskew commented Feb 27, 2026

@kriszyp operation_user -> operations. this is what you were thinking, right? this does feel better 🤔

Copy link
Member

@kriszyp kriszyp left a comment

Choose a reason for hiding this comment

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

Fantastic, thank you!

@heskew heskew force-pushed the user-role-select-ops branch from c253151 to 1742b4c Compare February 27, 2026 00:20
Copy link
Member

@DavidCockerill DavidCockerill left a comment

Choose a reason for hiding this comment

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

Looks good! This will be a much needed addition. We’ll just need to make sure we include this new functionality in the v5 docs.

@@ -0,0 +1,484 @@
/**
Copy link
Member

Choose a reason for hiding this comment

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

should this file be camel case? operationUserRbac.test.ts?

Copy link
Member Author

Choose a reason for hiding this comment

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

it looks like the new integration tests have been kebab-case
image

@heskew heskew merged commit 8def919 into main Feb 27, 2026
22 checks passed
@heskew heskew deleted the user-role-select-ops branch February 27, 2026 16:24
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

Successfully merging this pull request may close these issues.

3 participants