export class User
{
    username?: string;
    email?: string;
    password?: string;
    roles?: string[];
    initial?: boolean;
}

export function hasAnyRole(user: User | undefined, requiredRoles: string[])
{
    if(user && user.roles != undefined)
    {
        const roles = user.roles;
        for(const role of roles)
        {
            if(requiredRoles.includes(role))
            {
                return true;
            }
        }
    }
    return false;
}