Class AclLinterHelperServiceImpl
- All Implemented Interfaces:
AclLinterHelperService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlinkParentsInNewTransaction(Class<? extends SecuredChild<?>> clazz, List<Long> identifiers) Link each ofidentifiersto the parent ACL identity its entity resolves to, in a new transaction that commits independently of the caller's.voidsetParentAcl(Class<? extends Securable> clazz, Long identifier, AclObjectIdentity parentAoi) This MUST go throughMutableAclService.updateAcl(MutableAcl)rather thanAclObjectIdentity.setParentObject(AclObjectIdentity).
-
Constructor Details
-
AclLinterHelperServiceImpl
public AclLinterHelperServiceImpl()
-
-
Method Details
-
linkParentsInNewTransaction
@Transactional(propagation=REQUIRES_NEW) public Collection<AclLinterService.LintResult> linkParentsInNewTransaction(Class<? extends SecuredChild<?>> clazz, List<Long> identifiers) Description copied from interface:AclLinterHelperServiceLink each ofidentifiersto the parent ACL identity its entity resolves to, in a new transaction that commits independently of the caller's.Identifiers whose entity cannot be found, or whose parent cannot be resolved, are reported as unfixed rather than failing the batch — a BioMaterial shared by more than one experiment has no single parent to pick, and there is no point losing the rest of the batch over it.
- Specified by:
linkParentsInNewTransactionin interfaceAclLinterHelperService
-
setParentAcl
@Transactional public void setParentAcl(Class<? extends Securable> clazz, Long identifier, AclObjectIdentity parentAoi) This MUST go throughMutableAclService.updateAcl(MutableAcl)rather thanAclObjectIdentity.setParentObject(AclObjectIdentity).AclObjectIdentityis annotated@Immutable, so Hibernate silently discards the dirty state and the fix never reaches the database — no exception, no UPDATE. On 2026-08-06 a production repair run reported 548 successful parent assignments while writing none of them. Routing throughJdbcMutableAclServicemakes the write land and evicts the ACL cache.entries_inheriting has to be turned on with the parent, not just the parent set. Spring only walks to the parent when it is on, so a link written without it grants nothing and the run still reports a fix. It is off on exactly the rows this repairs: BaseAclAdvice sets it from inheritFromParent, which is false when no parent was discoverable at insert time — the same branch that gives the child its own ACEs. Those ACEs stay, and correctly so: Spring checks an ACL's own entries before the parent's. AclEventListener.handleChild sets both for the same reason.
- Specified by:
setParentAclin interfaceAclLinterHelperService
-