Skip to content

Instantly share code, notes, and snippets.

@baso53
Created November 14, 2021 12:51
Show Gist options
  • Select an option

  • Save baso53/5ef1af9e9e06dbae4c6b72e81459899b to your computer and use it in GitHub Desktop.

Select an option

Save baso53/5ef1af9e9e06dbae4c6b72e81459899b to your computer and use it in GitHub Desktop.
@RequiredArgsConstructor
public class DomainGrantedAuthority implements GrantedAuthority {
private final EntityType entityType;
private final Long entityId;
private final Permission permission;
@Override
public String getAuthority() {
return entityType +
":" +
entityId +
":" +
permission;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment