Last active
December 18, 2018 19:42
-
-
Save jhewlett/556e71a759ab6c909f452f8b12067809 to your computer and use it in GitHub Desktop.
Nested authorization checks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match firstCheck () with | |
| Some c when c.CanRead -> Ok () | |
| _ -> | |
match secondCheck () with | |
| Some c when c.CanRead -> Ok () | |
| _ -> | |
match thirdCheck () with | |
| Some c when c.CanRead -> Ok () | |
| _ -> Error NotAuthorized |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment