Ignore:
Timestamp:
01/04/23 02:49:26 (23 months ago)
Author:
andrejtodorovski <82031894+andrejtodorovski@…>
Branches:
main
Children:
ab952ab
Parents:
6832924
Message:

Configured spring security, changed spring version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/autopartz/model/Client.java

    r6832924 rae042f4  
    11package com.example.autopartz.model;
    22
    3 import jakarta.persistence.Entity;
    4 import lombok.*;
     3import lombok.Getter;
     4import lombok.RequiredArgsConstructor;
     5import lombok.Setter;
     6import lombok.ToString;
    57import org.hibernate.Hibernate;
     8import org.springframework.security.core.GrantedAuthority;
    69
     10import javax.persistence.Entity;
     11import java.util.Collection;
     12import java.util.Collections;
    713import java.util.Objects;
    814
     
    2531        return getClass().hashCode();
    2632    }
     33    @Override
     34    public Collection<? extends GrantedAuthority> getAuthorities() {
     35        return Collections.singletonList(Role.ROLE_CLIENT);
     36    }
    2737}
Note: See TracChangeset for help on using the changeset viewer.