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

    r6832924 rae042f4  
    11package com.example.autopartz.model;
    22
    3 import jakarta.persistence.*;
    4 import lombok.*;
     3import lombok.Getter;
     4import lombok.Setter;
     5import lombok.ToString;
    56import org.hibernate.Hibernate;
     7import org.springframework.security.core.GrantedAuthority;
    68
     9import javax.persistence.Entity;
    710import java.time.LocalDate;
     11import java.util.Collection;
     12import java.util.Collections;
    813import java.util.Objects;
    914
     
    2934        return getClass().hashCode();
    3035    }
     36
     37    @Override
     38    public Collection<? extends GrantedAuthority> getAuthorities() {
     39        return Collections.singletonList(Role.ROLE_ADMIN);
     40    }
    3141}
Note: See TracChangeset for help on using the changeset viewer.