enableRowActions looking at the wrong schema #9759
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes rancherlabs/ranchersecurity/1205
It looks like the code that should've enabled the row actions on the features list was looking at the
setting
schema instead of thefeature
schema in the management store like it should've been.Occurred changes and/or fixed issues
Just changed the type we're looking for on the features list to enable row actions on the features list.
Technical notes summary
When a user has minimal permissions to change features (presumably uncommon, the user will usually be an admin of some type), it's critical that we validate permissions against the correct schema until a more robust permission checking method can be implemented.
Areas or cases that should be tested
Should be able to just test the rowActions on the table at
/c/_/settings/management.cattle.io.feature
to make sure they appear correctly when the user has the permissions listed underhttps://github.com/rancherlabs/rancher-security/issues/1205
Areas which could experience regressions
This is a pretty targeted change, no regressions expected.