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/Deliveryman.java

    r6832924 rae042f4  
    11package com.example.autopartz.model;
    22
    3 import jakarta.persistence.Entity;
    4 import jakarta.persistence.Table;
    5 import lombok.*;
     3import lombok.Getter;
     4import lombok.RequiredArgsConstructor;
     5import lombok.Setter;
     6import lombok.ToString;
    67import org.hibernate.Hibernate;
     8import org.springframework.security.core.GrantedAuthority;
    79
     10import javax.persistence.Entity;
     11import javax.persistence.Table;
    812import java.time.LocalDate;
     13import java.util.Collection;
     14import java.util.Collections;
    915import java.util.Objects;
    1016
     
    3036        return getClass().hashCode();
    3137    }
     38    @Override
     39    public Collection<? extends GrantedAuthority> getAuthorities() {
     40        return Collections.singletonList(Role.ROLE_DELIVERYMAN);
     41    }
    3242}
Note: See TracChangeset for help on using the changeset viewer.