Class AclEntryAfterInvocationValueObjectCollectionReadProvider
- All Implemented Interfaces:
org.springframework.security.access.AfterInvocationProvider
- Direct Known Subclasses:
AclEntryAfterInvocationValueObjectMapReadProvider
AFTER_ACL_VALUE_OBJECT_COLLECTION_READ
config attribute: bulk ACL check + per-row SecureValueObject security-metadata
population over a returned collection.
Replaces gsec's AclEntryAfterInvocationValueObjectCollectionFilteringProvider as
part of the Phase 3 AfterInvocation modernization (Phase B). Behaviorally identical to the
gsec class — same bulk-fetch ACL pass (one readAclsById call for the whole
collection, not N reads), same per-row filtering, same side-effect that populates
isPublic / isShared / userOwned / userCanWrite on every retained VO. Lives in
gemma-core so gsec's class can be retired from the after-invocation provider chain without
touching the 20 @Secured({..., "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ"}) call sites
(ExpressionExperimentService bulk loaders, GeneSetService, etc.).
Cannot be expressed as plain @PostFilter: the security metadata side-effect on every
retained VO is load-bearing — the catalog / dataset / gene-set listing UIs render lock /
share / edit icons per row based on those flags. @PostFilter can only retain or drop;
it has no hook to mutate retained elements. A @PostFilter variant that called a
helper inside the SpEL would re-fetch ACLs per row and lose the bulk optimization.
Extends gsec's AclEntryAfterInvocationCollectionFilteringProvider (the
bulk-optimized parent — same base used by the existing Gemma-owned association providers
for composite sequences and data vectors). That class manages the ThreadLocal-stashed
per-row permission results so the inherited decide() loop in Spring's stock
AclEntryAfterInvocationCollectionFilteringProvider can call back into the
single-object hasPermission cheaply.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe single config attribute string this provider responds to.Fields inherited from class org.springframework.security.acls.afterinvocation.AclEntryAfterInvocationCollectionFilteringProvider
loggerFields inherited from class org.springframework.security.acls.afterinvocation.AbstractAclProvider
aclService, objectIdentityRetrievalStrategy, processConfigAttribute, processDomainObjectClass, requirePermission, sidRetrievalStrategy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAclEntryAfterInvocationValueObjectCollectionReadProvider(org.springframework.security.acls.model.AclService aclService, String processConfigAttribute, List<org.springframework.security.acls.model.Permission> requirePermission) Subclass constructor used by Map-shaped variants that delegate to this collection provider with a different config attribute (e.g.AclEntryAfterInvocationValueObjectCollectionReadProvider(org.springframework.security.acls.model.AclService aclService, List<org.springframework.security.acls.model.Permission> requirePermission) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean[]hasPermission(org.springframework.security.core.Authentication authentication, List<Object> domainObjects) Bulk-processing version ofAclEntryAfterInvocationCollectionFilteringProvider.hasPermission(Authentication, Object).Methods inherited from class AclEntryAfterInvocationCollectionFilteringProvider
decide, getObjectIdentities, hasPermission, hasPermissionMethods inherited from class org.springframework.security.acls.afterinvocation.AbstractAclProvider
getProcessDomainObjectClass, setObjectIdentityRetrievalStrategy, setProcessConfigAttribute, setProcessDomainObjectClass, setSidRetrievalStrategy, supports, supports
-
Field Details
-
ATTRIBUTE
The single config attribute string this provider responds to. Must match the value used in@Secured({..., "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ"})annotations.- See Also:
-
-
Constructor Details
-
AclEntryAfterInvocationValueObjectCollectionReadProvider
public AclEntryAfterInvocationValueObjectCollectionReadProvider(org.springframework.security.acls.model.AclService aclService, List<org.springframework.security.acls.model.Permission> requirePermission) -
AclEntryAfterInvocationValueObjectCollectionReadProvider
protected AclEntryAfterInvocationValueObjectCollectionReadProvider(org.springframework.security.acls.model.AclService aclService, String processConfigAttribute, List<org.springframework.security.acls.model.Permission> requirePermission) Subclass constructor used by Map-shaped variants that delegate to this collection provider with a different config attribute (e.g. the keys-only Map provider). Mirrors the protected constructor on gsec's collection provider so subclasses can pass their ownprocessConfigAttributewhile inheriting all the bulk-fetch + VO-populate logic.
-
-
Method Details
-
hasPermission
protected boolean[] hasPermission(org.springframework.security.core.Authentication authentication, List<Object> domainObjects) Description copied from class:AclEntryAfterInvocationCollectionFilteringProviderBulk-processing version ofAclEntryAfterInvocationCollectionFilteringProvider.hasPermission(Authentication, Object).- Overrides:
hasPermissionin classAclEntryAfterInvocationCollectionFilteringProvider
-