Conversation
Opening the plugin detail modal for a plugin whose plugin.yaml declares
`required_roles` as policy-rule objects ({description, apiGroups, resources,
verbs}) instead of strings crashed the modal with React error #31 (objects
are not valid as a React child).
- Coerce each required-role entry to a display string via formatRequiredRole()
(uses description, else summarizes apiGroups/resources: verbs).
- Widen the RBAC types (frontend + BFF) to accept string | rule-object.
- Convert this plugin's own plugin.yaml required_roles to the canonical
string form used by the charter schema and other plugins.
- Add a regression test for the rule-object shape.
---
Signed-off-by: Guillaume Moutier <guimou@users.noreply.github.com>
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 a crash (React error #31 — objects are not valid as a React child) when opening the detail modal for a plugin whose
plugin.yamldeclaresrequired_rolesas full policy-rule objects ({description, apiGroups, resources, verbs}) instead of the canonical descriptive strings. This plugin's own manifest was the only one deviating from the string convention, so it was the only one that crashed.Changes
PluginDetailModalcoerces each required-role entry to a display string via a newformatRequiredRole()helper (usesdescription, else summarizesapiGroups/resources: verbs), so no third-party manifest can crash the admin catalog.requiredRoles(frontend + BFF) to acceptstring | rule-object.plugin.yamlrequired_rolesto the canonical string form used by the charter schema and other plugins (display-only metadata; chart RBAC unaffected).Verification
No version bump (0.1.4 was prepared but not tagged/released).