How to treat group-level templates in forked projects
In %11.4 we're looking to add group-level file templates. The templates come from the group the project is in. When a fork of one of these projects - which is in a different group - wants to look up templates, this throws up interesting issues:
The following discussion from !7776 (merged) should be addressed:
-
@nick.thomas started a discussion: (+3 comments) @jramsay @iamphill when editing/adding a file on a merge request, should we consider the source or target project's templates? I feel like it should be the latter. Being able to open the MR is enough of a permissions check to grant access to the contents of the templates, I think.
Both blob edit and web IDE frontends are exposed in a merge request, so whichever one we decide it should be, we'll have to ensure that it uses the right one.
The current implementation will use the forked project's templates everywhere except in the merge request view, where the web IDE and blob edit functionality will use the target project's templates. We should revisit this within a few releases to ensure that this behaviour is sensible.
/cc @jramsay