Skip to content

[Failure Store] Remove IndicesPermissions#test(IndexAbstraction) method #127513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants