mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
ACS-5506 Fix string to node ref cast exception
This commit is contained in:
@@ -147,7 +147,7 @@ public class GroupsImpl implements Groups
|
|||||||
}
|
}
|
||||||
|
|
||||||
Map<QName, Serializable> props = new HashMap<>();
|
Map<QName, Serializable> props = new HashMap<>();
|
||||||
if (StringUtils.isNotEmpty(group.getDescription()))
|
if (group.getDescription() != null)
|
||||||
{
|
{
|
||||||
props.put(ContentModel.PROP_DESCRIPTION, group.getDescription());
|
props.put(ContentModel.PROP_DESCRIPTION, group.getDescription());
|
||||||
}
|
}
|
||||||
@@ -170,7 +170,7 @@ public class GroupsImpl implements Groups
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (StringUtils.isNotEmpty(group.getDescription()))
|
if (group.getDescription() != null)
|
||||||
{
|
{
|
||||||
authorityService.setAuthorityDisplayNameAndDescription(groupId, group.getDisplayName(), group.getDescription());
|
authorityService.setAuthorityDisplayNameAndDescription(groupId, group.getDisplayName(), group.getDescription());
|
||||||
}
|
}
|
||||||
|
@@ -269,7 +269,18 @@ public class ACLEntryAfterInvocationProvider implements AfterInvocationProvider,
|
|||||||
}
|
}
|
||||||
else if (Pair.class.isAssignableFrom(returnedObject.getClass()))
|
else if (Pair.class.isAssignableFrom(returnedObject.getClass()))
|
||||||
{
|
{
|
||||||
return decide(authentication, object, config, (Pair) returnedObject);
|
Pair<?, ?> pair = (Pair<?, ?>) returnedObject;
|
||||||
|
if (pair.getSecond() != null && NodeRef.class.isAssignableFrom(pair.getSecond().getClass()))
|
||||||
|
{
|
||||||
|
return decide(authentication, object, config, pair);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
if (log.isDebugEnabled())
|
||||||
|
{
|
||||||
|
log.debug("Uncontrolled object - access allowed for " + object.getClass().getName());
|
||||||
|
}
|
||||||
|
return returnedObject;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (ChildAssociationRef.class.isAssignableFrom(returnedObject.getClass()))
|
else if (ChildAssociationRef.class.isAssignableFrom(returnedObject.getClass()))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user