Disable stories routes under public deployment #2642
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.
Description
This PR attempts to resolve #2633 to disable the routes in the public deployment as stories are not yet available. The fix moves all stories-related routes to under
fullAcademyrouter, instead of being under common routes where they would still be accessible in the public deployment.Alternatively, adding a environment variable can also be considered instead, to toggle whether stories routes will be enabled (similar to how
githubAssessmentswork right now). If this is the right way going forward, let me know and I will refactor the code accordingly.Also as a side note, the stories component might also need to updated to have its own router instead, as right now they are statically defined in the main
routerConfigfile. This will also ease the implementation of #2632 where more fine-grained permissions control can be done within its own router. However, this is outside the scope of this PR and should be in its own standalone update.Type of change
How to test
Check if the routes are accessible when
REACT_APP_USE_BACKENDis true and when is false (fullAcademy mode enabled and disabled).The code has been tested locally, and confirmed that stories routes will no longer be present.
Checklist