Couple of MT fixes

- default admin should not see tenant-specific stores
- nodeRef properties should not be returned as tenant-specific

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6686 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-09-06 11:33:38 +00:00
parent 9f539ce6e7
commit 4e94c52813

View File

@@ -208,7 +208,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
StoreRef storeRef = store.getStoreRef();
try
{
if (tenantService.isTenantUser())
if (tenantService.isEnabled())
{
tenantService.checkDomain(storeRef.getIdentifier());
storeRef = tenantService.getBaseName(storeRef);
@@ -987,6 +987,12 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
PropertyValue propertyValue = entry.getValue();
// get the property definition
PropertyDefinition propertyDef = dictionaryService.getProperty(propertyQName);
if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.NODE_REF)) && (propertyValue.getStringValue() != null))
{
propertyValue.setStringValue(tenantService.getBaseName(new NodeRef(propertyValue.getStringValue())).toString());
}
// convert to the correct type
Serializable value = makeSerializableValue(propertyDef, propertyValue);
// copy across
@@ -1033,6 +1039,12 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
// get the property definition
PropertyDefinition propertyDef = dictionaryService.getProperty(qname);
if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.NODE_REF)) && (propertyValue.getStringValue() != null))
{
propertyValue.setStringValue(tenantService.getBaseName(new NodeRef(propertyValue.getStringValue())).toString());
}
// convert to the correct type
Serializable value = makeSerializableValue(propertyDef, propertyValue);
// done