return doAddUser();
}
public String doDeleteUser() throws Exception
{
AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
if(this.extraMultiParameter == null || this.extraMultiParameter.length == 0)
{
if(interceptionPointCategory.equalsIgnoreCase("Content"))
{
Integer contentId = new Integer(parameters);
ContentVO contentVO = ContentControllerProxy.getController().getContentVOWithId(contentId);
if(!contentVO.getCreatorName().equalsIgnoreCase(this.getInfoGluePrincipal().getName()))
{
Integer protectedContentId = ContentControllerProxy.getController().getProtectedContentId(contentId);
if(ContentControllerProxy.getController().getIsContentProtected(contentId) && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "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 in published state we must first make it working state so it can later be published
if(siteNodeVersionVO.getStateId().intValue() != SiteNodeVersionVO.WORKING_STATE)
{
this.oldParameters = "" + siteNodeVersionId;
//System.out.println("We better state change....");
List events = new ArrayList();
//System.out.println("OLd siteNodeVersionVO:" + siteNodeVersionVO.getId());
siteNodeVersionVO = SiteNodeStateController.getController().changeState(siteNodeVersionVO.getId(), SiteNodeVersionVO.WORKING_STATE, "Access right changes", true, this.getInfoGluePrincipal(), siteNodeVersionVO.getSiteNodeId(), events);
//System.out.println("New siteNodeVersionVO:" + siteNodeVersionVO.getId());
this.newParameters = "" + siteNodeVersionVO.getId();
this.parameters = "" + siteNodeVersionVO.getId();
siteNodeVersionId = siteNodeVersionVO.getId();
}
if(!siteNodeVersionVO.getVersionModifier().equalsIgnoreCase(this.getInfoGluePrincipal().getName()))
{
Integer protectedSiteNodeVersionId = SiteNodeVersionControllerProxy.getSiteNodeVersionControllerProxy().getProtectedSiteNodeVersionId(siteNodeVersionId);
if(protectedSiteNodeVersionId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "SiteNodeVersion.ChangeAccessRights", siteNodeVersionId.toString()))
ceb.add(new AccessConstraintException("SiteNodeVersion.siteNodeId", "1006"));
}
}
ceb.throwIfNotEmpty();
}
String userName = this.getRequest().getParameter("userName");
if(this.extraMultiParameter != null && this.extraMultiParameter.length > 0)
{