mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -208,7 +208,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
StoreRef storeRef = store.getStoreRef();
|
StoreRef storeRef = store.getStoreRef();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (tenantService.isTenantUser())
|
if (tenantService.isEnabled())
|
||||||
{
|
{
|
||||||
tenantService.checkDomain(storeRef.getIdentifier());
|
tenantService.checkDomain(storeRef.getIdentifier());
|
||||||
storeRef = tenantService.getBaseName(storeRef);
|
storeRef = tenantService.getBaseName(storeRef);
|
||||||
@@ -987,6 +987,12 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
PropertyValue propertyValue = entry.getValue();
|
PropertyValue propertyValue = entry.getValue();
|
||||||
// get the property definition
|
// get the property definition
|
||||||
PropertyDefinition propertyDef = dictionaryService.getProperty(propertyQName);
|
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
|
// convert to the correct type
|
||||||
Serializable value = makeSerializableValue(propertyDef, propertyValue);
|
Serializable value = makeSerializableValue(propertyDef, propertyValue);
|
||||||
// copy across
|
// copy across
|
||||||
@@ -1033,6 +1039,12 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
|
|
||||||
// get the property definition
|
// get the property definition
|
||||||
PropertyDefinition propertyDef = dictionaryService.getProperty(qname);
|
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
|
// convert to the correct type
|
||||||
Serializable value = makeSerializableValue(propertyDef, propertyValue);
|
Serializable value = makeSerializableValue(propertyDef, propertyValue);
|
||||||
// done
|
// done
|
||||||
|
Reference in New Issue
Block a user