Commit 93a92b30 authored by michael.simon's avatar michael.simon
Browse files

redirect not working

parent 3fd091e5
......@@ -10,14 +10,18 @@
******************************************************************************/
package edu.kit.scc.webreg.bean;
import java.io.IOException;
import java.io.Serializable;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
import javax.faces.event.ComponentSystemEvent;
import javax.inject.Inject;
import org.slf4j.Logger;
import edu.kit.scc.webreg.entity.RegistryEntity;
import edu.kit.scc.webreg.entity.SamlUserEntity;
import edu.kit.scc.webreg.entity.UserEntity;
......@@ -37,6 +41,9 @@ public class DeleteAllPersonalDataBean implements Serializable {
private List<RegistryEntity> registryList;
@Inject
private Logger logger;
@Inject
private UserService userService;
......@@ -68,7 +75,12 @@ public class DeleteAllPersonalDataBean implements Serializable {
public String commit() {
userDeleteService.deleteUserData(user, "user-" + user.getId());
return "/logout/local?redirect=delete&faces-redirect=true";
try {
FacesContext.getCurrentInstance().getExternalContext().redirect("/logout/local?redirect=delete");
} catch (IOException e) {
logger.warn("Redirect failed", e);
}
return "";
}
public UserEntity getUser() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment