FEATURE: Better multi-site support for media module #4426
Closed
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.
Currently, the Neos Media module offers no easily feasible path for multi-site support.
Asset collection names can hold any characters (up to 255). With an agreement of
specific asset collection titles (see below Working with specific asset collection titles)
in interaction with privilege methods
titleStartsWith
,titleEndsWith
andtitleContains
for asset collection titles it is possible to utilize the Neos Mediamodule for multi-site installations
The privilege methods
titleStartsWith
,titleEndsWith
andtitleContains
are available for asset titles and do operate identical on asset collection titles
when copied to the corresponding php source.
Some other Media interface features screw up the separation of assets for different
sites:
The Neos Media module offers som feature configurations (see file
Packages/Neos/Neos.Media.Browser/Configuration/Settings.yaml
of this PR)which easily can be extended
With these feature entries the Neos Media module can be customized as required for multi-site support:
showCollectionsAll.enable
to falseshowTags.enable
to falseReview instructions
tds
is my development domainRetrieve the node names
Policy.yaml
for all three sites. Example file isDistributionPackages/First.Site/Configuration/Policy.yaml
Result (if
Policy.yaml
is set for all three sites)first
,second
andthird
. Passwords are set to user's names:Repeat this step for sites
Second
andThird
.It is mandatory to utilize these domains to access the Neos backends for operation of the site specific default asset collections.
https://first.tds/neos
as userfirst
(passwordfirst
) and go to Mediahttps://second.tds/neos
as usersecond
(passwordsecond
) and go to MediaWorking with specific asset collection titles
To work with specific asset collection titles set the feature parameter
collectionTree.separator
toa character used to separate the different parts of the asset collection title (slash
/
for example)in file
Packages/Neos/Neos.Media.Browser/Configuration/Settings.yaml
of this PR.Log into Neos backend at
https://first.tds/neos
as userfirst
(passwordfirst
) and go to Mediaand add two asset collections
first/one
first/one/two
results in a tree view (each asset collection has an asset assigned):
Clicking the "edit" pencil at the "Collections" shows that the "base" asset collection (first)
cannot be edited or deleted.
Deleting one asset collection...
...moves the assets of the deleted asset collection to the "base" asset collection (first)
Checklist
The PR is created against the lowest maintained branchFEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions