if(!userName.equals(CmsPropertyHandler.getAnonymousUser()))
{
InfoGluePrincipal user = UserControllerProxy.getController().getUser(userName);
if(user.getAutorizationModule().getSupportDelete())
{
buttons.add(new ToolbarButton("",
getLocalizedString(locale, "tool.managementtool.deleteSystemUser.header"),
getLocalizedString(locale, "tool.managementtool.deleteSystemUser.header"),
"DeleteSystemUser.action?userName=" + formatter.encodeBase64(userName) + "&igSecurityCode=" + request.getSession().getAttribute("securityCode"),
"css/images/v3/createBackgroundPenPaper.gif",
"left",
"delete",
false,
true,
getLocalizedString(locale, "tool.managementtool.deleteSystemUser.header"),
getLocalizedString(locale, "tool.managementtool.deleteSystemUser.text", new String[]{userName}),
"workIframe"));
}
if(user.getAutorizationModule().getSupportUpdate())
{
buttons.add(new ToolbarButton("",
getLocalizedString(locale, "tool.managementtool.viewSystemUserPasswordDialog.header"),
getLocalizedString(locale, "tool.managementtool.viewSystemUserPasswordDialog.header"),
"UpdateSystemUserPassword!input.action?userName=" + formatter.encodeBase64(userName) + "&igSecurityCode=" + request.getSession().getAttribute("securityCode"),
"css/images/v3/passwordIcon.gif",
"accessRights",
"workIframe"));
//buttons.add(new ToolbarButton("UpdateSystemUserPassword!input.action?userName=" + URLEncoder.encode(URLEncoder.encode(primaryKey, URIEncoding), URIEncoding), getLocalizedString(locale, "images.managementtool.buttons.updateSystemUserPassword"), "Update user password"));
boolean hasAccessToRenameSystemUser = hasAccessTo(principal, "SystemUser.changeUsername", false);
if (hasAccessToRenameSystemUser)
{
buttons.add(new ToolbarButton("",
getLocalizedString(locale, "tool.managementtool.viewSystemUserUserNameDialog.header"),
getLocalizedString(locale, "tool.managementtool.viewSystemUserUserNameDialog.header"),
"UpdateSystemUserUserName!input.action?userName=" + formatter.encodeBase64(userName) + "&igSecurityCode=" + request.getSession().getAttribute("securityCode"),
"css/images/v3/group.png",
"transferUser",
"workIframe"));
}
}
}
List contentTypeDefinitionVOList = UserPropertiesController.getController().getContentTypeDefinitionVOList(userName);
if(contentTypeDefinitionVOList.size() > 0)
{
buttons.add(new ToolbarButton("",
getLocalizedString(locale, "tool.managementtool.viewUserProperties.header"),
getLocalizedString(locale, "tool.managementtool.viewUserProperties.header"),
"ViewUserProperties.action?userName=" + formatter.encodeBase64(userName),
"css/images/v3/advancedSettingsIcon.gif",
"properties",
"workIframe"));
//buttons.add(new ToolbarButton("ViewUserProperties.action?userName=" + URLEncoder.encode(URLEncoder.encode(primaryKey, URIEncoding), URIEncoding), getLocalizedString(locale, "images.managementtool.buttons.viewSystemUserProperties"), "View User Properties"));
}
// if(principal.getIsAdministrator())
if(principal.getIsAdministrator())
{
buttons.add(new ToolbarButton("",
getLocalizedString(locale, "tool.managementtool.transferAccessRights.header"),
getLocalizedString(locale, "tool.managementtool.transferAccessRights.header"),
"AuthorizationSwitchManagement!inputUser.action?userName=" + formatter.encodeBase64(userName),
"css/images/v3/createBackgroundPenPaper.gif",
"create",