Details
-
Bug
-
Resolution: Obsolete
-
Medium
-
None
-
3.10.0, 3.9.4, 4.0.0
-
None
Description
1 .If you have multiple site on on ez installation and setup the siteaccesses in extension, the webdav.ini.append.php will ignored.
But every installation (siteaccess) maybe has it's own FolderClasses Settings.
The following code fix this
//load extension siteaccess to get webdaav.ini values for folderClass eZExtension::prependExtensionSiteAccesses( $currentSite, false, true, false, false ); $webDavIni->loadCache( true );
2. enhancement
If you have several sites / project for different customers on one ez installation you do not want to show all customers which sites are available for webdav - accesses by the root url of webdav.
To fix this I made a new ini setting in webdav.ini
# Patch - show webdavrootfolder with all available site only if it is public # global webdav.ini.append.php # enabled - all available site for webdav will be displayed # disabled - sitelist is not shown - only direct access to sitaccess is possible # http://webdav.domain.de/siteaccess_admin [GeneralSettings] RootFolderPublicVisible=enabled
that will be used in webdav.php:
// The top/root folder is publicly available (without auth): if ( $_SERVER['REQUEST_URI'] == '' or $_SERVER['REQUEST_URI'] == '/' or $_SERVER['REQUEST_URI'] == '/webdav.php/' or $_SERVER['REQUEST_URI'] == '/webdav.php' ) { // Patch - show webdavrootfolder with all available site only if it is public // global webdav.ini.append.php // # enabled - all available site for webdav will be displayed // # disabled - sitelist is not shown - only direct access to sitaccess is possible // # http://webdav.domain.de/siteaccess_admin // [GeneralSettings] // RootFolderPublicVisible=enabled $rootFolderPublicVisible = 'enabled'; if( $webDavIni->hasVariable( 'GeneralSettings', 'RootFolderPublicVisible' ) ) $rootFolderPublicVisible = $webDavIni->variable( 'GeneralSettings', 'RootFolderPublicVisible' ); if( $rootFolderPublicVisible === 'enabled' ) { $testServer = new eZWebDAVContentServer(); $testServer->processClientRequest(); } else { header( "HTTP/1.1 403 Forbidden" ); } }
So you can choose if you list all available sites or only give direct access e.g. http://webdav.domain.de/siteaccess_admin
This would be nice to have in the ez core
Thank's
Felix