RM-2208 (Prevent classification of shared content)

+review RM @rwetherall

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@105284 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2015-06-01 13:32:12 +00:00
parent 5834374b85
commit 7916227e88
2 changed files with 20 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ import java.util.Map;
import java.util.Set;
import org.alfresco.model.ContentModel;
import org.alfresco.model.QuickShareModel;
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;
@@ -98,6 +99,10 @@ public class ContentClassificationServiceImpl extends ServiceBaseImpl implements
throw new UnsupportedOperationException(
"The content has already been classified. Reclassification is currently not supported.");
}
if (nodeService.hasAspect(content, QuickShareModel.ASPECT_QSHARE))
{
throw new IllegalStateException("A shared content cannot be classified.");
}
if (!securityClearanceService.isCurrentUserClearedForClassification(classificationLevelId))
{
throw new LevelIdNotFound(classificationLevelId);