mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Audit related errors seen on console that had no side effect cleaned up
* discovered whilst testing RM-1835 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@97109 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -94,18 +94,22 @@ public final class AuthenticatedUserRolesDataExtractor extends AbstractDataExtra
|
||||
return null;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder(100);
|
||||
|
||||
// Get the rm root
|
||||
NodeRef rmRootNodeRef = filePlanService.getFilePlan(nodeRef);
|
||||
|
||||
Set<Role> roles = filePlanRoleService.getRolesByUser(rmRootNodeRef, user);
|
||||
StringBuilder sb = new StringBuilder(100);
|
||||
for (Role role : roles)
|
||||
if (rmRootNodeRef != null)
|
||||
{
|
||||
if (sb.length() > 0)
|
||||
Set<Role> roles = filePlanRoleService.getRolesByUser(rmRootNodeRef, user);
|
||||
for (Role role : roles)
|
||||
{
|
||||
sb.append(", ");
|
||||
if (sb.length() > 0)
|
||||
{
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append(role.getDisplayLabel());
|
||||
}
|
||||
sb.append(role.getDisplayLabel());
|
||||
}
|
||||
|
||||
// Done
|
||||
|
@@ -93,15 +93,18 @@ public final class FilePlanNamePathDataExtractor extends AbstractDataExtractor
|
||||
try
|
||||
{
|
||||
NodeRef nodeRef = (NodeRef) value;
|
||||
|
||||
// Get path from the RM root
|
||||
List<NodeRef> nodeRefPath = filePlanService.getNodeRefPath(nodeRef);
|
||||
|
||||
StringBuilder sb = new StringBuilder(128);
|
||||
for (NodeRef pathNodeRef : nodeRefPath)
|
||||
|
||||
if (nodeService.hasAspect(nodeRef, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT))
|
||||
{
|
||||
String name = (String)nodeService.getProperty(pathNodeRef, ContentModel.PROP_NAME);
|
||||
sb.append("/").append(name);
|
||||
// Get path from the RM root
|
||||
List<NodeRef> nodeRefPath = filePlanService.getNodeRefPath(nodeRef);
|
||||
|
||||
for (NodeRef pathNodeRef : nodeRefPath)
|
||||
{
|
||||
String name = (String)nodeService.getProperty(pathNodeRef, ContentModel.PROP_NAME);
|
||||
sb.append("/").append(name);
|
||||
}
|
||||
}
|
||||
|
||||
// Done
|
||||
|
@@ -467,7 +467,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
||||
// Prepend it to the path
|
||||
nodeRefPath.addFirst(nodeRef);
|
||||
// Are we not at the root
|
||||
if (!isFilePlan(nodeRef))
|
||||
if (!isFilePlan(nodeRef) && isFilePlanComponent(nodeRef))
|
||||
{
|
||||
ChildAssociationRef assocRef = nodeService.getPrimaryParent(nodeRef);
|
||||
if (assocRef == null)
|
||||
|
Reference in New Issue
Block a user