package com.psg.dlsysinfo.dl_sysinfo_server.security;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.List;

@Getter
@AllArgsConstructor
public class CurrentUser {
    private final String username;
    private final String displayName;
    private final String clientIdentifier;
    private final Long userId;
    private final List<String> roles;

    public boolean hasRole(String role) {
        return roles != null && roles.contains(role);
    }
}
