Skip to content

Conversation

@Tristan-WorkGH
Copy link
Contributor

If we look that the hasElementsAccessControl() is always false with implementations of EndPointServer, and always true with the override of EndPointElementServer.
When analysing ElementAccessControllerGlobalPreFilter, it is in fact considering that if there is elements access control, then it is an EndPointElementServer (cast object).

This PR:

  • remove hasElementsAccessControl() from EndPointServer
  • rename EndPointElementServer to EndPointAccessControlledServer to be more explicit of what the interface permit
  • optimize regex by compiling pattern once and reusing it

it's caracterized by `EndPointElementServer` interface
If a pattern is to be used multiple times, compiling it once and reusing it will be more efficient than invoking this method each time.
@Tristan-WorkGH Tristan-WorkGH self-assigned this Apr 23, 2024
@Tristan-WorkGH Tristan-WorkGH changed the title Refactor/access control More explicit endpoint access control API Apr 23, 2024
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants