Ignore:
Timestamp:
02/03/23 23:11:04 (22 months ago)
Author:
DenicaKj <dkorvezir@…>
Branches:
master
Children:
eb226b2
Parents:
1b248e4
Message:

Spring Security

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/model/Worker.java

    r1b248e4 rac25203  
    55import lombok.Setter;
    66import lombok.ToString;
     7import org.springframework.security.core.GrantedAuthority;
     8
     9import java.util.Collection;
     10import java.util.Collections;
    711
    812@Entity
     
    2125    @ManyToOne()
    2226    Cinema cinema;
     27    @Override
     28    public Collection<? extends GrantedAuthority> getAuthorities() {
     29        return Collections.singletonList(Role.ROLE_ADMIN);
     30    }
    2331
    2432}
Note: See TracChangeset for help on using the changeset viewer.