Closed timyates closed 4 days ago
In the PermissionSecurityRule, the request object is annotated as Nullable, but we weren't testing for null.
This PR checks for null first of all.
I refactored the method into a optional flow which I hope is easier to read.
And then fixed the tests (we no longer call hasAnnotation as findAnnotation returns an optional, so provides enough info to continue)
In the PermissionSecurityRule, the request object is annotated as Nullable, but we weren't testing for null.
This PR checks for null first of all.
I refactored the method into a optional flow which I hope is easier to read.
And then fixed the tests (we no longer call hasAnnotation as findAnnotation returns an optional, so provides enough info to continue)