|
@ -33,10 +33,11 @@ public class Admin implements UserDetails, Serializable { |
|
|
public Collection<? extends GrantedAuthority> getAuthorities() { |
|
|
public Collection<? extends GrantedAuthority> getAuthorities() { |
|
|
Set<GrantedAuthority>authorities = new HashSet<>(); |
|
|
Set<GrantedAuthority>authorities = new HashSet<>(); |
|
|
if(permission == 1){ |
|
|
if(permission == 1){ |
|
|
|
|
|
|
|
|
authorities.add(new SimpleGrantedAuthority("ROLE_SUPER_ADMIN")); |
|
|
authorities.add(new SimpleGrantedAuthority("ROLE_SUPER_ADMIN")); |
|
|
}else if(permission == 2){ |
|
|
}else if(permission == 2){ |
|
|
authorities.add(new SimpleGrantedAuthority("ROLE_ADMIN")); |
|
|
authorities.add(new SimpleGrantedAuthority("ROLE_ADMIN")); |
|
|
|
|
|
}else if(permission == 3){ |
|
|
|
|
|
authorities.add(new SimpleGrantedAuthority("ROLE_AUDITORS")); |
|
|
} |
|
|
} |
|
|
return authorities; |
|
|
return authorities; |
|
|
} |
|
|
} |
|
|