Skip to content

Conversation

@webocs
Copy link

@webocs webocs commented May 28, 2019

# Whitelist Hooks

For a use case we have, we needed to whitelist by user role and not by user IP. Thus, I added a new option called whitelistHook and whitelistHookSync. The objective of such options is to provide the user a mean to whitelist using whatever criteria she needs. It uses the same logic that onDenial.

Changes

  • Added whiteListHook option
  • Added whiteListHookSync option
  • Added behavior for both options, this required splitting the _handle method in two
  • Added tests for both options
  • Updated readme

Final remarks

I figured I'd PR it since it can be useful to others, be free to accept or reject

Cheers!

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