- Issue created by @brad.bulger
- πΊπΈUnited States drpldrp San Francisco, CA
Is it to be able to give users admin access to domain menus?
Yes.
- πΊπΈUnited States brad.bulger
Would that be better than trying to segregate that functionality into another module?
- πΊπΈUnited States drpldrp San Francisco, CA
Yea, I'd rather not spin up a new thing and have to do update funcs and all that.
Try this patch and let me know how it goes.
- πΊπΈUnited States drpldrp San Francisco, CA
Oops, forgot a thing.
Use this one.
- πΊπΈUnited States brad.bulger
I've changed my installed copy to dev-3.x so I had to make a couple small changes to the patch to remove code that was already there. It seems to work fine.
- πΊπΈUnited States drpldrp San Francisco, CA
I'll probably release these changes in a new version in a few weeks.
I noticed one more spot that should probably be altered:
src/Plugin/EntityReferenceSelection/DomainMenusSelection.php:
protected function buildEntityQuery($match = NULL, $match_operator = 'CONTAINS') { $query = parent::buildEntityQuery($match, $match_operator); if ($this->moduleHandler->moduleExists('domain_access')) { $config = $this->getConfiguration(); $menu_domains = $config['menu_domains'] ?? NULL; $domain_access_field = defined('DOMAIN_ACCESS_FIELD') ? DOMAIN_ACCESS_FIELD : DomainAccessManagerInterface::DOMAIN_ACCESS_FIELD; $domain_access_all_field = defined('DOMAIN_ACCESS_ALL_FIELD') ? DOMAIN_ACCESS_ALL_FIELD : DomainAccessManagerInterface::DOMAIN_ACCESS_ALL_FIELD; if (!empty($menu_domains)) { $group = $query->orConditionGroup() ->condition($domain_access_field, $menu_domains, 'IN') ->condition($domain_access_all_field, '1'); $query->condition($group); } } return $query; }
- Status changed to Fixed
about 1 year ago 5:46pm 27 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.