com.netgrif.application.engine.auth.domain.AnonymousUser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of application-engine Show documentation
Show all versions of application-engine Show documentation
System provides workflow management functions including user, role and data management.
package com.netgrif.application.engine.auth.domain;
import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;
@Document
@Data
public class AnonymousUser extends User {
public AnonymousUser() {
super();
}
public AnonymousUser(ObjectId id) {
super(id);
}
public AnonymousUser(String email, String password, String name, String surname) {
super(email, password, name, surname);
}
@Override
public LoggedUser transformToLoggedUser() {
LoggedUser loggedUser = new LoggedUser(this.get_id().toString(), this.getEmail(), "n/a", this.getAuthorities());
loggedUser.setFullName(this.getFullName());
loggedUser.setAnonymous(true);
if (!this.getProcessRoles().isEmpty())
loggedUser.parseProcessRoles(this.getProcessRoles());
if (!this.getNextGroups().isEmpty())
loggedUser.setGroups(this.getNextGroups());
return loggedUser;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy