Class SecurityServiceTest


public class SecurityServiceTest extends BaseSpringContextTest5
Tests the SecurityService: making objects public or private and testing the permissions.
Author:
keshav
  • Constructor Details

    • SecurityServiceTest

      public SecurityServiceTest()
  • Method Details

    • setUp

      @BeforeEach public void setUp() throws Exception
      Throws:
      Exception
    • testDuplicateAcesNotAddedOnPrivateExpressionExperiment

      @Test public void testDuplicateAcesNotAddedOnPrivateExpressionExperiment()
    • testMakeEEGroupReadWrite

      @Test public void testMakeEEGroupReadWrite()
    • testMakeExpressionExperimentPrivate

      @Test public void testMakeExpressionExperimentPrivate()
    • testMakePrivateWithoutPermission

      @Test public void testMakePrivateWithoutPermission()
    • testRemoveMultipleAcesFromPrivateExpressionExperiment

      @Test public void testRemoveMultipleAcesFromPrivateExpressionExperiment()
    • testSetOwner

      @Test public void testSetOwner()
    • testSetPrincipalSID

      @Test public void testSetPrincipalSID()
    • testUserCanEdit

      @Test public void testUserCanEdit()
    • testUserCanRead

      @Test public void testUserCanRead()
    • makePublicRecordsTheTransitionOnceAndNotAgain

      @Test public void makePublicRecordsTheTransitionOnceAndNotAgain()
      The date a dataset FIRST became public has to come from somewhere, and until now nothing recorded it: only two REST endpoints emitted MakePublicEvent, so anything made public by the CLI or a bulk job left no trace. Production carried 0 occurrences across a 200-dataset sample.

      Emitting from SecurityServiceImpl.makePublic covers every path. This pins the two properties that make "first" answerable: the event is written on the transition, and a repeat call — which returns early because the object is already public — writes nothing. Without the second property the earliest event would still be right, but the trail would gain a row per redundant call.