Forums / Setup & design / SiteAccessSettings in multisite

SiteAccessSettings in multisite

Author Message

Pascal France

Saturday 28 January 2006 9:02:06 am

Hi,

I'm trying to configure a multisite (4 sites) and there is something I don't understand.
It seems I have to configure settings/override/site.ini.append.php like that:

     19 [SiteAccessSettings]
     20 CheckValidity=false
     21 AvailableSiteAccessList[]=allobroges
     22 AvailableSiteAccessList[]=allobroges_admin
     23 AvailableSiteAccessList[]=mpt
     24 AvailableSiteAccessList[]=mpt_admin
     25 AvailableSiteAccessList[]=mutualite
     26 AvailableSiteAccessList[]=mutualite_admin
     27 AvailableSiteAccessList[]=villeneuve
     28 AvailableSiteAccessList[]=villeneuve_admin
     29 MatchOrder=uri
     30 HostMatchMapItems[]

But now, when I log in as admin I can see all siteaccess. And I want to see only the two related to my site (eg: mpt and mpt_admin).
I've tried to remove these lines and put them in the "site.ini.append.php" siteaccess files, like that:
settings/siteaccess/mpt_admin/site.ini.append.php

     19 [SiteAccessSettings]
     20 CheckValidity=false
     21 AvailableSiteAccessList[]=mpt
     22 AvailableSiteAccessList[]=mpt_admin
     23 MatchOrder=uri
     24 HostMatchMapItems[]

settings/siteaccess/mutualite_admin/site.ini.append.php

     19 [SiteAccessSettings]
     20 CheckValidity=false
     21 AvailableSiteAccessList[]=mutualite
     22 AvailableSiteAccessList[]=mutualite_admin
     23 MatchOrder=uri
     24 HostMatchMapItems[]

and so on dor the two other sites. But it doesn't works.

Thinks for your help

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Sunday 29 January 2006 7:42:51 am

Hi,

In settings/site.ini it is wrotte:

      4 # NOTE: It is not recommended to edit this files directly, instead
      5 #       a file in override should be created for setting the
      6 #       values that is required for your site. Either create
      7 #       a file called settings/override/site.ini.append or
      8 #       settings/override/site.ini.append.php for more security

Isn't there any way to bypass override/site.ini.append.php ?

I wonder if there is not a bug here, because I can remove, for example, settings/override/design.ini.append.php and have settings/siteaccess/mysite/design.ini.append.php and it works fine. Why this wouldn't work with site.ini ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Thomas Nunninger

Sunday 29 January 2006 11:33:22 pm

Hi Pascal,

the /settings directory holds the default settings of the system (given from eZ systems). In /settings/override you define global musts. This is: you change the default values from /settings and those values can't be overriden by your settings in /settings/siteaccess/X. Because of that there is no need to have any values in /settings/override or in /settings/siteaccess/X - the values from /settings are used. But if you have settings in /settings/override you are not able to override them sitespecific. Perhaps you should have a look in http://ez.no/doc/ez_publish/technical_manual/3_6/concepts_and_basics/configuration (and its subitems).

Your first point: in http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/siteaccesssettings/availablesiteaccesslist it says:

"This setting has to be set in settings/override/site.ini.append(.php). eZ publish will use the matching rules to decide which siteaccess a user wants to access. You can override specific settings for each siteaccess in settings/siteaccess/site_access_name/."

So I guess you are not able to move this settings in the /settings/siteaccess. I haven't had this problem yet. But perhaps you are able to insert a new setting LocalAvailableSiteAccessList[] and override all the admin templates which show you the AvailableSiteAccessList data.

Hope that helps a little bit

Thomas

Thomas Nunninger

Sunday 29 January 2006 11:39:46 pm

I've forgotten: There is a setting SiteList (http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/sitesettings/sitelist). It says:

"Sets the siteaccesses available to outside sources (currently used for webdav only)."

Perhaps you can use this settings instead of my proposed LocalAvailableSiteAccessList. And perhaps you file a bug/suggestion in the bug tracking system :-)

Thomas

Pascal France

Monday 30 January 2006 1:31:51 am

Hi Thomas,

Here is my settings/site.ini

http://www.linuxorable.net/temp/site.ini

here, my settings/siteaccess/mpt/site.ini.append.php

http://www.linuxorable.net/temp/mpt/site.ini.append

and here my settings/siteaccess/mpt_admin/site.ini.append.php

http://www.linuxorable.net/temp/mpt_admin/site.ini.append

and this is the result:

http://www.linuxorable.net/ez_mjc_3.7.2/index.php/mpt

I know I can't override an override/xxxx file but I spent all my week-end to determine the matter, without success.

Could you tell me your opinion about my files in order I know if I face a bug or not ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Thomas Nunninger

Monday 30 January 2006 2:14:20 am

Hi,

as I've written: the doc says that you must to pecifiy the AvailableSiteAccessList in /settings/override and not in /settings/siteaccess/X because this data is needed for choosing the right siteaccess. (But sometimes the documentation is wrong and I haven't checked the code itself.)

On the other hand you didn't show me your settings/override/site.ini.append. I guess you deleted it totally, because you are shown the installer. Responsible fot this is the CheckValidity setting. You've set this in your siteaccess/x/site.ini.append - but I guess that this is checked before any siteaccess is chosen. And so there are only the settings in /settings and /settings/override available.

At least you need to specify the CheckValidity in /settings/override/site.ini.append. Then the installer should have gone. But according to the doc I would say it won't work than. (I think it would make sense if you must set all settings in the SiteAccessSettings group in site.ini in the override directory. By name those settings are used to choose the right siteaccess. -- But I haven't checked)

According to the documentation I think the best thing should be to use the SiteList setting in site.ini for this issue (as I've written in my previous answer). I haven't looked in the code and I don't have time to do this at the moment. But according to the documentation I can't see how this would be possible at the moment (perhaps I'm wrong). I would even file this as a bug and not only as a suggestion because this isn't helpfull in multisite setups.

But perhaps someone else has a better solution?

Hope that helps a little bit

Thomas

Pascal France

Monday 30 January 2006 2:40:35 am

Hi Thomas,

You've solved one problem: you absolutly right about the CheckValidity paramater which has to be set to false (in siteaccess/x/site.ini.append)

Then I don't need any more override/site.ini.append

But I've always the same thing: all siteaccess are displayed in all backend :-(
And I find that stange with a mutisite.

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Thomas Nunninger

Monday 30 January 2006 3:16:44 am

Hi Pascal,

But I've always the same thing: all siteaccess are displayed in all backend :-( And I find that stange with a mutisite.

That's what I've written sometimes in my previous answers :-) According to the documentation it won't work (if the documentation and I'm right). If I were you I would feel free to file a bug report about this (or at least a suggestion).

Perhaps you are able to modify all related templates to use the SiteList settings instead of the AvailableSiteAccessList settings and then contribute those modifications with the bug report :-)

Have a nice day

Thomas