Skip to content
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

Enable short-circuiting in has_cached_role #560

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

thomas-mcdonald
Copy link
Member

Rather than iterate through the entire roles array and then report if
there are any values returned, we can instead use any? with a block
that will short-circuit when the first truthy value is returned.

This changes the call signature for RoleAdapter#find_cached* to return
boolean rather than an array

reopening #519 not-as-a-fork to get actions building

thomas-mcdonald and others added 3 commits June 13, 2019 15:48
Rather than iterate through the entire roles array and then report if
there are any values returned, we can instead use any? with a block
that will short-circuit when the first truthy value is returned.

This changes the call signature for RoleAdapter#find_cached* to return
boolean rather than an array
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.

1 participant