mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-2123 Ensure user has clearance to classify content.
Also add clearance check method into security profile. +review RM-58 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@104750 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,6 +29,7 @@ import java.util.Set;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.classification.ClassificationServiceException.InvalidNode;
|
||||
import org.alfresco.module.org_alfresco_module_rm.classification.ClassificationServiceException.LevelIdNotFound;
|
||||
import org.alfresco.module.org_alfresco_module_rm.classification.model.ClassifiedContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
@@ -97,11 +98,12 @@ public class ContentClassificationServiceImpl extends ServiceBaseImpl implements
|
||||
throw new UnsupportedOperationException(
|
||||
"The content has already been classified. Reclassification is currently not supported.");
|
||||
}
|
||||
if (!securityClearanceService.isCurrentUserClearedForClassification(classificationLevelId))
|
||||
{
|
||||
throw new LevelIdNotFound(classificationLevelId);
|
||||
}
|
||||
|
||||
Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
|
||||
// Check the classification level id - an exception will be thrown if the id cannot be found
|
||||
levelManager.findLevelById(classificationLevelId);
|
||||
|
||||
// Initial classification id
|
||||
if (nodeService.getProperty(content, PROP_INITIAL_CLASSIFICATION) == null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user