HakeshDigital Posted February 20 Share Posted February 20 On 1/15/2024 at 11:54 AM, nexuspolaris said: Web -Regions -Search -Registration --regiosite ---About us ---FAQ ---404 --origosite ---About us ---FAQ ---404 I think you must not use the home page as a website. The way this works for me is like this: Home -RootDomain --Regions --Search --Registration --404 -regiosite --About us --FAQ -origosite --About us --FAQ Also like this, having a 404 page for each site: Home -RootDomain --Regions --Search --Registration --404 -regiosite --About us --FAQ --404 -origosite --About us --FAQ --404 Link to comment Share on other sites More sharing options...
HakeshDigital Posted February 20 Share Posted February 20 On 8/7/2022 at 3:50 PM, Kiwi Chris said: @kixe Your fork of the module doesn't allow issue reports on Github, so I'll mention it here. There is a hook into AdminRestrictBranch module if present to automatically restrict the page tree to the root of the domain in multisite mode. if ($this->wire('modules')->isInstalled('AdminRestrictBranch')) { if (method_exists('AdminRestrictBranch', '___getBranchRootParentId')) { $this->addHookAfter('AdminRestrictBranch::getBranchRootParentId', function ($e) { $e->return = $this->rootPageID; }); } else $this->warning('AdminRestrictBranch::getBranchRootParentId() is not hookable'); } Where this has an issue is that if a user is only supposed to have access to page tree belonging to domain A as defined in AdminRestrictBranch, and then logs in to domain B, the branch restriction defined in their user profile or role is overridden by the hook in multisite. This means if any user knows other domains under the same installation of ProcessWire using Multisite, they can log in and access the page tree of those domains, even if AdminRestrictBranch is configured to otherwise prevent them from accessing them. A quick fix is to comment out the hook code. A better fix would be to check whether a user or role already has branch restrictions in place defined by AdminRestrictBranch, and if so, defer to those restrictions, but if not, provide default behaviour as exists of restricting to the root of the domain. Hi @Kiwi Chris. Can you please tell me how to make the @kixemodule to work? How to make the language hookable? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now