Problem/Motivation
When using Linkit in a WYSIWYG text editor, you can only see contents assigned to the current domain.
It would be interesting to be able to see contents from other domains assigned to the current user.
Proposed resolution
Extend default Linkit NodeMatcher to add temporary domain grants before doing the selection query.
Related domain issue: #3562696: Allow linking to nodes in other domains
Issue fork domain_extras-3562857
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
lincoln-batsirayi commentedI’ve tested this and can confirm that it's working as expected, when the newly created "Assigned Domains Content" matcher is added the user is now able to search for content from all domains.
General note, I don’t know if it's worth adding a disclaimer somewhere that this matcher should replace the default matcher that already exists or not because initially i kept my original one and i was seeing duplicated content because of it, but maybe people can work it out?
Also this also works really work with domain_source because then you can ensure that the outputted link goes to the correct domain source, without the module this may result in a lot of dead links
Comment #4
mably commentedThe following text was added to the configuration documentation:
And this will be added to the Domain Access documentation:
Comment #5
mably commentedMay be we should "hide" this feature behind a custom permission?
Something like "Allow referencing content on all assigned domains"?
What do you think?
Comment #6
mably commentedFeature now requires the new "Allow referencing content on all assigned domains" dedicated permission.
Comment #7
mably commentedHi @lincoln-batsirayi, can you validate that this MR still works after removing the dependency with the now-closed related Domain issue?
Comment #8
mably commentedI'll merge it as soon as I get a RTBC.
Comment #9
lincoln-batsirayi commentedI’ve tested this and can confirm that the new permission is functioning as expected (if the user is assigned to both domains and does not have the permission they can only search for content items in the same domain, having the permission allows them to search for content in all domains) and the MR update has had no adverse impact on the functionality which still works.
Comment #10
mably commentedThanks for the review @lincoln-batsirayi!
Merging.
Comment #11
mably commentedComment #13
mably commentedNew related documentation page generated using MkDocs:
https://domain-extras-bc969b.pages.drupalcode.org/domain_access_linkit/