mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Build/test fix (File server configuration error -> Error creating filesystem AVM)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15960 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2373,40 +2373,47 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface
|
|||||||
|
|
||||||
NodeRef webNodeRef = new NodeRef( prop.getStringValue());
|
NodeRef webNodeRef = new NodeRef( prop.getStringValue());
|
||||||
|
|
||||||
// Create the web project pseudo folder
|
if (m_nodeService.exists(webNodeRef))
|
||||||
|
|
||||||
WebProjectStorePseudoFile webProjFolder = new WebProjectStorePseudoFile( storeDesc, FileName.DOS_SEPERATOR_STR + storeName, webNodeRef);
|
|
||||||
fstate.addPseudoFile( webProjFolder);
|
|
||||||
|
|
||||||
// DEBUG
|
|
||||||
|
|
||||||
if ( logger.isDebugEnabled())
|
|
||||||
logger.debug( "Found web project " + webProjFolder.getFileName());
|
|
||||||
|
|
||||||
// Get the list of content managers for this web project
|
|
||||||
|
|
||||||
List<ChildAssociationRef> mgrAssocs = m_nodeService.getChildAssocs( webNodeRef, WCMAppModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL);
|
|
||||||
|
|
||||||
for ( ChildAssociationRef mgrRef : mgrAssocs)
|
|
||||||
{
|
{
|
||||||
// Get the child node and see if it is a content manager association
|
// Create the web project pseudo folder
|
||||||
|
|
||||||
NodeRef childRef = mgrRef.getChildRef();
|
WebProjectStorePseudoFile webProjFolder = new WebProjectStorePseudoFile( storeDesc, FileName.DOS_SEPERATOR_STR + storeName, webNodeRef);
|
||||||
|
fstate.addPseudoFile( webProjFolder);
|
||||||
if ( m_nodeService.getProperty( childRef, WCMAppModel.PROP_WEBUSERROLE).equals(ROLE_CONTENT_MANAGER))
|
|
||||||
{
|
// DEBUG
|
||||||
// Get the user name add it to the web project pseudo folder
|
|
||||||
|
if ( logger.isDebugEnabled())
|
||||||
String userName = (String) m_nodeService.getProperty( childRef, WCMAppModel.PROP_WEBUSERNAME);
|
logger.debug( "Found web project " + webProjFolder.getFileName());
|
||||||
|
|
||||||
webProjFolder.addUserRole( userName, WebProjectStorePseudoFile.RoleContentManager);
|
// Get the list of content managers for this web project
|
||||||
|
|
||||||
// DEBUG
|
List<ChildAssociationRef> mgrAssocs = m_nodeService.getChildAssocs( webNodeRef, WCMAppModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL);
|
||||||
|
|
||||||
if ( logger.isDebugEnabled())
|
for ( ChildAssociationRef mgrRef : mgrAssocs)
|
||||||
logger.debug(" Added content manager " + userName);
|
{
|
||||||
}
|
// Get the child node and see if it is a content manager association
|
||||||
}
|
|
||||||
|
NodeRef childRef = mgrRef.getChildRef();
|
||||||
|
|
||||||
|
if ( m_nodeService.getProperty( childRef, WCMAppModel.PROP_WEBUSERROLE).equals(ROLE_CONTENT_MANAGER))
|
||||||
|
{
|
||||||
|
// Get the user name add it to the web project pseudo folder
|
||||||
|
|
||||||
|
String userName = (String) m_nodeService.getProperty( childRef, WCMAppModel.PROP_WEBUSERNAME);
|
||||||
|
|
||||||
|
webProjFolder.addUserRole( userName, WebProjectStorePseudoFile.RoleContentManager);
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
|
||||||
|
if ( logger.isDebugEnabled())
|
||||||
|
logger.debug(" Added content manager " + userName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logger.warn("AVM Store '"+storeName+"' with webProjectNodeRef that does not exist: "+webNodeRef);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2519,21 +2526,28 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface
|
|||||||
|
|
||||||
WebProjectStorePseudoFile webProj = (WebProjectStorePseudoFile) folderList.findFile( curFile.getWebProject(), true);
|
WebProjectStorePseudoFile webProj = (WebProjectStorePseudoFile) folderList.findFile( curFile.getWebProject(), true);
|
||||||
|
|
||||||
// Strip the web project name from the sandbox store name and extract the user name.
|
if (webProj == null)
|
||||||
// Add the user as a publisher/reviewer to the web project roles list
|
|
||||||
|
|
||||||
String userName = curFile.getFileName().substring( webProj.getFileName().length() + 2);
|
|
||||||
|
|
||||||
// If the user does not have a content manager role then add as a publisher
|
|
||||||
|
|
||||||
if ( webProj.getUserRole( userName) == WebProjectStorePseudoFile.RoleNone)
|
|
||||||
{
|
{
|
||||||
webProj.addUserRole( userName, WebProjectStorePseudoFile.RolePublisher);
|
logger.warn("Missing web project for: "+curFile.getFileName()+" ("+curFile.getWebProject()+")");
|
||||||
|
}
|
||||||
// DEBUG
|
else
|
||||||
|
{
|
||||||
if ( logger.isDebugEnabled())
|
// Strip the web project name from the sandbox store name and extract the user name.
|
||||||
logger.debug( "Added publisher " + userName + " to " + webProj.getFileName());
|
// Add the user as a publisher/reviewer to the web project roles list
|
||||||
|
|
||||||
|
String userName = curFile.getFileName().substring( webProj.getFileName().length() + 2);
|
||||||
|
|
||||||
|
// If the user does not have a content manager role then add as a publisher
|
||||||
|
|
||||||
|
if ( webProj.getUserRole( userName) == WebProjectStorePseudoFile.RoleNone)
|
||||||
|
{
|
||||||
|
webProj.addUserRole( userName, WebProjectStorePseudoFile.RolePublisher);
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
|
||||||
|
if ( logger.isDebugEnabled())
|
||||||
|
logger.debug( "Added publisher " + userName + " to " + webProj.getFileName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3071,39 +3085,46 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface
|
|||||||
|
|
||||||
NodeRef webNodeRef = new NodeRef( prop.getStringValue());
|
NodeRef webNodeRef = new NodeRef( prop.getStringValue());
|
||||||
|
|
||||||
// Create the web project pseudo folder
|
if (m_nodeService.exists(webNodeRef))
|
||||||
|
{
|
||||||
WebProjectStorePseudoFile webProjFolder = new WebProjectStorePseudoFile( storeDesc, FileName.DOS_SEPERATOR_STR + storeName, webNodeRef);
|
// Create the web project pseudo folder
|
||||||
fstate.addPseudoFile( webProjFolder);
|
|
||||||
|
WebProjectStorePseudoFile webProjFolder = new WebProjectStorePseudoFile( storeDesc, FileName.DOS_SEPERATOR_STR + storeName, webNodeRef);
|
||||||
// DEBUG
|
fstate.addPseudoFile( webProjFolder);
|
||||||
|
|
||||||
if ( logger.isDebugEnabled())
|
// DEBUG
|
||||||
logger.debug( " Found web project " + webProjFolder.getFileName());
|
|
||||||
|
if ( logger.isDebugEnabled())
|
||||||
// Get the list of content managers for this web project
|
logger.debug( " Found web project " + webProjFolder.getFileName());
|
||||||
|
|
||||||
List<ChildAssociationRef> mgrAssocs = m_nodeService.getChildAssocs( webNodeRef, WCMAppModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL);
|
// Get the list of content managers for this web project
|
||||||
|
|
||||||
for ( ChildAssociationRef mgrRef : mgrAssocs)
|
List<ChildAssociationRef> mgrAssocs = m_nodeService.getChildAssocs( webNodeRef, WCMAppModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL);
|
||||||
|
|
||||||
|
for ( ChildAssociationRef mgrRef : mgrAssocs)
|
||||||
|
{
|
||||||
|
// Get the child node and see if it is a content manager association
|
||||||
|
|
||||||
|
NodeRef childRef = mgrRef.getChildRef();
|
||||||
|
|
||||||
|
if ( m_nodeService.getProperty( childRef, WCMAppModel.PROP_WEBUSERROLE).equals(ROLE_CONTENT_MANAGER))
|
||||||
|
{
|
||||||
|
// Get the user name add it to the web project pseudo folder
|
||||||
|
|
||||||
|
String userName = (String) m_nodeService.getProperty( childRef, WCMAppModel.PROP_WEBUSERNAME);
|
||||||
|
|
||||||
|
webProjFolder.addUserRole( userName, WebProjectStorePseudoFile.RoleContentManager);
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
|
||||||
|
if ( logger.isDebugEnabled())
|
||||||
|
logger.debug(" Added content manager " + userName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Get the child node and see if it is a content manager association
|
logger.warn("AVM Store '"+storeName+"' with webProjectNodeRef that does not exist: "+webNodeRef);
|
||||||
|
|
||||||
NodeRef childRef = mgrRef.getChildRef();
|
|
||||||
|
|
||||||
if ( m_nodeService.getProperty( childRef, WCMAppModel.PROP_WEBUSERROLE).equals(ROLE_CONTENT_MANAGER))
|
|
||||||
{
|
|
||||||
// Get the user name add it to the web project pseudo folder
|
|
||||||
|
|
||||||
String userName = (String) m_nodeService.getProperty( childRef, WCMAppModel.PROP_WEBUSERNAME);
|
|
||||||
|
|
||||||
webProjFolder.addUserRole( userName, WebProjectStorePseudoFile.RoleContentManager);
|
|
||||||
|
|
||||||
// DEBUG
|
|
||||||
|
|
||||||
if ( logger.isDebugEnabled())
|
|
||||||
logger.debug(" Added content manager " + userName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user