Skip to content

Conversation

@slobodanadamovic
Copy link
Contributor

@slobodanadamovic slobodanadamovic commented Apr 29, 2025

Inlined and removed IndicesPermissions#test(IndexAbstraction) method with IntelliJ.

Followup on https://github.com/elastic/elasticsearch/pull/123986/files#r2000804553

Inlined and removed `IndicesPermissions#test(IndexAbstraction)` method.
@slobodanadamovic slobodanadamovic added >refactoring :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Security Meta label for security team auto-backport Automatically create backport pull requests when merged v8.19.0 v9.1.0 labels Apr 29, 2025
@slobodanadamovic slobodanadamovic self-assigned this Apr 29, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

Copy link
Contributor

@n1v0lg n1v0lg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol - big diff!

@slobodanadamovic
Copy link
Contributor Author

slobodanadamovic commented Apr 29, 2025

lol - big diff!

IntelliJ didn't do a good job here with inlining. 🙈 It introduced unnecessarily too many local variables, which doubled the number of lines. I'll have to do some cleanup. For example:

IndexAbstraction indexAbstraction5 = mockIndexAbstraction(randomAlphaOfLengthBetween(8, 24));
assertThat(isResourceAuthorizedPredicate5.test(indexAbstraction5, IndexComponentSelector.DATA), is(false));

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

Labels

auto-backport Automatically create backport pull requests when merged >refactoring :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Security Meta label for security team v8.19.0 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants