RM-2123 Update Java API to filter with current user's clearance.

+review RM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103851 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tom Page
2015-05-08 08:11:58 +00:00
parent 88ab2c282b
commit 5927722e4d
2 changed files with 32 additions and 10 deletions

View File

@@ -61,6 +61,7 @@ public class ClassificationServiceImpl extends ServiceBaseImpl
private AttributeService attributeService; // TODO What about other code (e.g. REST API) accessing the AttrService?
private NodeService nodeService;
private SecurityClearanceService securityClearanceService;
private ClassificationServiceDAO classificationServiceDao;
/** The classification levels currently configured in this server. */
@@ -70,6 +71,7 @@ public class ClassificationServiceImpl extends ServiceBaseImpl
public void setAttributeService(AttributeService service) { this.attributeService = service; }
public void setNodeService(NodeService service) { this.nodeService = service; }
public void setSecurityClearanceService(SecurityClearanceService service) { this.securityClearanceService = service; }
/** Set the object from which configuration options will be read. */
public void setClassificationServiceDAO(ClassificationServiceDAO classificationServiceDao) { this.classificationServiceDao = classificationServiceDao; }
@@ -207,8 +209,7 @@ public class ClassificationServiceImpl extends ServiceBaseImpl
{
return Collections.emptyList();
}
// FIXME Currently assume user has highest security clearance, this should be fixed as part of RM-2112.
ClassificationLevel usersLevel = levelManager.getMostSecureLevel();
ClassificationLevel usersLevel = securityClearanceService.getUserSecurityClearance().getClearanceLevel();
return restrictList(levelManager.getClassificationLevels(), usersLevel);
}