Class ExperimentalFactorServiceTest
-
Nested Class Summary
Nested classes/interfaces inherited from class BaseDatabaseTest5
BaseDatabaseTest5.BaseDatabaseTestContextConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoid🛑 The factor is STILL IN its design's factor collection whenbioMaterialService.findByFactoris called.Methods inherited from class BaseDatabaseTest5
flushAndClearSession
-
Constructor Details
-
ExperimentalFactorServiceTest
public ExperimentalFactorServiceTest()
-
-
Method Details
-
testDeleteExperimentalFactor
@Test public void testDeleteExperimentalFactor() -
testDeleteExperimentalFactorUsedByASample
@Test public void testDeleteExperimentalFactorUsedByASample() -
testFactorIsStillAttachedToItsDesignWhenFindByFactorIsCalled
@Test public void testFactorIsStillAttachedToItsDesignWhenFindByFactorIsCalled()🛑 The factor is STILL IN its design's factor collection whenbioMaterialService.findByFactoris called. Detaching first denies the call.BioMaterialService#findByFactoris@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}). An ExperimentalFactor is a SecuredChild, andParentIdentityRetrievalStrategyImplresolves its ACL parent viaExpressionExperimentDao.findIdByFactor, whose HQL joinsed.experimentalFactors. Removing the factor from that collection first makes the query auto-flush the pending removal and match no row: null parent identity, no inherited ACL, and the vote denies — for an administrator, because the lookup found nothing rather than a permission being refused.🛑 This context has no security interceptor, so there is no 403 to assert here; what it pins is the ordering the interceptor depends on. That is also why the first attempt at this bug missed: removing the caller's duplicate detach in
applyDesignChangeleft this one, one level down, one line before the call that actually trips.cab measured it on GSE19804 twice — 2026-09-09 and again on 2026-09-10 against the first fix, with a byte-identical stack naming
ExperimentalFactorServiceImpl.removeline 70.
-