ContentVO contentVO = ContentControllerProxy.getController().getContentVOWithId(contentId);
if(!contentVO.getCreatorName().equalsIgnoreCase(principal.getName()))
{
Integer protectedContentId = ContentControllerProxy.getController().getProtectedContentId(contentId);
if(ContentControllerProxy.getController().getIsContentProtected(contentId) && !AccessRightController.getController().getIsPrincipalAuthorized(principal, "Content.ChangeAccessRights", protectedContentId.toString()))
ceb.add(new AccessConstraintException("Content.contentId", "1006"));
}
}
else if(interceptionPointCategory.equalsIgnoreCase("SiteNodeVersion"))
{
Integer siteNodeVersionId = new Integer(parameters);
SiteNodeVersionVO siteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(siteNodeVersionId);
if(!siteNodeVersionVO.getVersionModifier().equalsIgnoreCase(principal.getName()))
{
Integer protectedSiteNodeVersionId = SiteNodeVersionControllerProxy.getSiteNodeVersionControllerProxy().getProtectedSiteNodeVersionId(siteNodeVersionId);
if(protectedSiteNodeVersionId != null && !AccessRightController.getController().getIsPrincipalAuthorized(principal, "SiteNodeVersion.ChangeAccessRights", siteNodeVersionId.toString()))
ceb.add(new AccessConstraintException("SiteNodeVersion.siteNodeId", "1006"));
}
}
else
{
ceb.add(new AccessConstraintException("Repository.repositoryId", "1006"));
}
ceb.throwIfNotEmpty();