-
Notifications
You must be signed in to change notification settings - Fork 64
feat(myopencre): implement MyOpenCRE frontend functionality behind backend capability flag #704
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
base: main
Are you sure you want to change the base?
feat(myopencre): implement MyOpenCRE frontend functionality behind backend capability flag #704
Conversation
- Validate file type, encoding, and required headers - Accept CSVs generated from CRE catalogue export - Skip empty and padding rows present in exported templates - Validate CRE format only when CRE references exist - Guard against misaligned rows with extra columns - Return structured validation errors before import This keeps the importer aligned with the exporter while preventing malformed inputs from causing server errors.
… header error handling
|
Hey @northdpole , Sir Thanks for the feedback earlier ! I've implemented runtime flag gating for MyOpenCRE to ensure it’s only available on self-hosted/admin-controlled OpenCRE instances. This prevents accidental exposure on platforms like opencre.org. With this setup, MyOpenCRE will only be active when enabled via the ENABLE_MYOPENCRE flag on self-hosted instances. For opencre.org, the feature remains inactive. Looking ahead, once user scoping (#586) is in place, we’ll implement feature flagging at the user level to control visibility based on roles (e.g., admin vs non-admin), offering finer access control. Appreciate your guidance, and I look forward to continuing the work! Would love to hear your thoughts on this! |
Summary
This PR introduces the MyOpenCRE frontend functionality, enabling the MyOpenCRE feature to be conditionally displayed based on the ENABLE_MYOPENCRE runtime flag. This feature ensures that MyOpenCRE functionality is only available when the flag is enabled, in alignment with the backend capability gating.
This PR depends on #700, which implements the backend for MyOpenCRE. With this PR, we have connected the frontend to the backend, allowing MyOpenCRE UI elements to appear and function only when the backend provides the capability signal.
Files Modified
The following files were modified as part of this PR:
Other changes are incidental (formatting, imports) and do not affect the logical behavior of the application.
What Changed
true)./api/capabilitiesendpoint, which informs whether MyOpenCRE should be displayed based on the current deployment configuration.Why This Change Was Introduced
The MyOpenCRE feature requires administrative control for self-hosted deployments. By gating the feature behind a runtime flag, it prevents accidental exposure on public platforms and ensures that it’s only accessible when explicitly enabled. This PR ensures that the frontend only shows the MyOpenCRE features when they are actually available, preventing user confusion.
This change:
Testing
ENABLE_MYOPENCRE=false (default):
ENABLE_MYOPENCRE=true:
Stacking / Follow-ups
This PR depends on #700 for the backend functionality (capability gating).
Next Steps
Conclusion
This PR provides the frontend functionality for MyOpenCRE based on the backend ENABLE_MYOPENCRE flag. It ensures that MyOpenCRE is only available when the backend allows it and is ready to be used in self-hosted deployments. Future work will refine user role-based controls and feature flagging for even finer control.