[BE] Change embed action to include all files
Important: All the new functionality must be implemented behind the feature flag :snippet_multiple_files
. Besides, it has to be scoped for users. Therefore, instead of checking if the feature flag is enabled or not (Feature.enabled?(:snippet_multiple_files)
), we will check if the feature flag is enabled for specific users (Feature.enabled?(:snippet_multiple_files, user)
).
At the moment, when we embed the snippet into a different page, we show only one page. Now that we have multiple files, we need to include all of them.
Testing Activity
- Check that we can show embed all the snippet files. We would need to add also specs to check whether we can include only specific files if the param
file
is added.
@vij :
- Ensure existing embed/share tests still pass
- Add test coverage for embed/share multiple file snippets
- Add test coverage for specific file sharing/embedding
MR Breakdown:
- 1 MR to change the show action to show all files
- 1 MR to add support for the files param
Future Iteration:
-
Bonus point: We could include the extra param
file
in order to render specific files in the snippet.
Edited by Francisco Javier López (ex-Gitlab)