Using spring ACL I can configure permissions for some actions on subject. My application requires customization of access rights to a subject very rarely. So i do not want fill ACL for default dependency, but need special instruction if ACL is empty.
For example, we have
branch1
|-doc1
|-doc2
|-doc3
branch2
|-doc1
|-doc2
|-doc3
user1 belongs to branch1
user2 belongs to branch2
By default implementation user1 should have an access to all documents in branch1 (if ACL is empty). user2 -> branch2. Sometimes user1 needs special access. He needs access to branch2.doc3 and he should have a restriction for branch1.doc2!
If I try implement solution in similar way with ACL recommendations I need add permissions for each user to each document in correspond branch. This way is very ugly because of normalization && permission. So I want implement solution where ACL logic used for cross references only and default permissions allows access for any user to each document in same branch...
By default I can use method annotations like @PostAuthorize or @PreAuthorize with checks like hasRole, hasPermission, but I can not build condition where restriction by permission is stronger than role or apply filter to request based on relations user-branch.
I know this idea should be possible to implement, but I did not find correspond description or trick example how to implement it...