Ignore:
Timestamp:
01/04/23 02:49:26 (18 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/Warehouseman.java

    r6832924 rae042f4  
    11package com.example.autopartz.model;
    22
    3 import jakarta.persistence.Entity;
    4 import jakarta.persistence.JoinColumn;
    5 import jakarta.persistence.ManyToOne;
    6 import lombok.*;
     3import lombok.Getter;
     4import lombok.RequiredArgsConstructor;
     5import lombok.Setter;
     6import lombok.ToString;
    77import org.hibernate.Hibernate;
     8import org.springframework.security.core.GrantedAuthority;
    89
     10import javax.persistence.Entity;
     11import javax.persistence.JoinColumn;
     12import javax.persistence.ManyToOne;
    913import java.time.LocalDate;
     14import java.util.Collection;
     15import java.util.Collections;
    1016import java.util.Objects;
    1117
     
    3339        return getClass().hashCode();
    3440    }
     41    @Override
     42    public Collection<? extends GrantedAuthority> getAuthorities() {
     43        return Collections.singletonList(Role.ROLE_WAREHOUSEMAN);
     44    }
    3545}
Note: See TracChangeset for help on using the changeset viewer.