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