This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » I still can see the nodes above my...
expandshrink

I still can see the nodes above my rootNode !

I still can see the nodes above my rootNode !

Friday 07 December 2012 12:13:24 pm - 2 replies

Hello everybody,

First, let my explain my configuration. I have one installation of eZPublish 2012.5 with several siteaccess. A schema of the node tree can be :

- Node of siteaccess A (node_id : 2)
   - Sites
      - Node of siteaccess B (node_id : 170)
      - Node of siteaccess C
      - Node of siteaccess D

The siteacess A is juste one page where we can find some fetches about all this others (recents articles, ...). The others are kind of small websites, with different designs. The users can access to the siteaccess B with siteaccessB.mysite.com and siteaccess C with siteaccessC.mysite.com. Here is a part of my configuration :

- settings/override/site.ini.append.php :

 
[SiteSettings]
DefaultAccess=siteaccessA
SiteList[]=siteaccessA
SiteList[]=siteaccessB
 
[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]=siteaccessA
AvailableSiteAccessList[]=siteaccessB
RelatedSiteAccessList[]=siteaccessA
RelatedSiteAccessList[]=siteaccessB
MatchOrder=host;uri
HostMatchType=map
HostMatchMapItems[]=siteaccesA.mysite.fr;siteaccessA
HostMatchMapItems[]=siteaccessB.mysite.fr;siteaccessB

- settings/siteaccesssiteB/site.ini.append.php :

[SiteSettings]
SiteURL=http://siteaccessB.mysitefr
IndexPage=/content/view/full/170
DefaultPage=/content/view/full/170
RootNodeDepth=3
 
[SiteAccessSettings]
PathPrefix=Sites/mangrove

- settings/siteaccesssiteB/content.ini.append.php :

[NodeSettings]
RootNode=170

With this configuration, the adress siteaccessB.mysite.com send me to the good node (node 170, under the siteaccessB). OK too with siteaccessB.mysite.com/products for the node "products" under the root node of the siteaccessB.

However, if I try to access to a node above (ex : node_id 2) or in a different siteaccess (siteaccessC for example) with  siteaccessB.mysite.com/content/view/full/, eZ allow me ! And I don't want that, i want that all siteaccess under the "Sites" node are totaly independant. I thought that i was on a good way with the .ini settings, but apparently its not enough... !

Does someone has a solution ? Thanks !

Paul

Modified on Friday 07 December 2012 12:16:03 pm by Paul FROMAGE

Saturday 08 December 2012 8:31:56 am

Hi Paul,

Your siteaccess are using the same database so everything is shared, I don't think you can prevent this behaviour.
If your only problem is system URLs ("content/view/full/*"blunk.gif Emoticon you may rewrite them from your apache config, so every siteaccess will be "chrooted".

RewriteRule ^/content/view/full/.* / [R=301,L]

Best,

*edit*

Ok just found a better way I think, for each site access:

-Put all content in a new section
-Create a new user with read access only to this section
-Overwrite the anonymous user ID for this siteaccess:
[UserSettings]
AnonymousUserID=123

Modified on Saturday 08 December 2012 8:39:04 am by Romain Petit

Saturday 08 December 2012 11:42:13 am

You will need to use the permission system to avoid users accessing nodes from other subtrees or above their top-level. You can grant read-access with a subtree-based limittaion, and limit all other policies as well (edit/move/delete etc) by adding the subtree-limitation in the assignment of role to user-group

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from