изменение сущности под новую страницу пользователя
This commit is contained in:
@@ -13,6 +13,7 @@ public class VisitorResponseDto {
|
||||
private String lastName;
|
||||
private Boolean invited;
|
||||
private Boolean isActive;
|
||||
private String image;
|
||||
private String role;
|
||||
|
||||
public static VisitorResponseDto mapToDto(Visitor e) {
|
||||
@@ -22,6 +23,7 @@ public class VisitorResponseDto {
|
||||
d.setName(e.getName());
|
||||
d.setLastName(e.getLastName());
|
||||
d.setRole(e.getRole().toString());
|
||||
d.setImage(e.getImage());
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ public class Visitor implements UserDetails {
|
||||
@Enumerated(EnumType.STRING)
|
||||
private UserRole role;
|
||||
private Integer code;
|
||||
private String image;
|
||||
private String login;
|
||||
private String password;
|
||||
private LocalDateTime expired;
|
||||
@@ -33,13 +34,6 @@ public class Visitor implements UserDetails {
|
||||
@Override
|
||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||
return role.getAuthorities();
|
||||
// return UserRole.ADMIN.getAuthorities();
|
||||
// return residents.stream()
|
||||
// .filter(BarResident::getActive)
|
||||
// .map(BarResident::getRole)
|
||||
// .map(UserRole::getAuthorities)
|
||||
// .flatMap(Collection::stream)
|
||||
// .collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user