How to logically combine pathMatchers in spring security
I am trying to setup a Spring Security for a WebFlux project in kotlin. Let's say I have the following endpoint:
/departments/{deptId}/users
And I need to allow access to it, if both below checks are true:
if user has access to the given deptId
if user has UserManagement authority.
I can make them work separately, but I cannot find a way to combine (logical AND) them together:
I'd like to return 403 if
user has right, but doesn't have access
user has access, but doesn't have right
and return...