Search in sources :

Example 1 with ReadProjectPermission

use of ca.corefacility.bioinformatics.irida.security.permissions.project.ReadProjectPermission in project irida by phac-nml.

the class ReadProjectPermissionTest method setUp.

@Before
public void setUp() {
    userRepository = mock(UserRepository.class);
    projectRepository = mock(ProjectRepository.class);
    pujRepository = mock(ProjectUserJoinRepository.class);
    ugpjRepository = mock(UserGroupProjectJoinRepository.class);
    ugRepository = mock(UserGroupJoinRepository.class);
    readProjectPermission = new ReadProjectPermission(projectRepository, userRepository, pujRepository, ugpjRepository, ugRepository);
}
Also used : ReadProjectPermission(ca.corefacility.bioinformatics.irida.security.permissions.project.ReadProjectPermission) UserRepository(ca.corefacility.bioinformatics.irida.repositories.user.UserRepository) ProjectRepository(ca.corefacility.bioinformatics.irida.repositories.ProjectRepository) UserGroupProjectJoinRepository(ca.corefacility.bioinformatics.irida.repositories.joins.project.UserGroupProjectJoinRepository) UserGroupJoinRepository(ca.corefacility.bioinformatics.irida.repositories.user.UserGroupJoinRepository) ProjectUserJoinRepository(ca.corefacility.bioinformatics.irida.repositories.joins.project.ProjectUserJoinRepository) Before(org.junit.Before)

Example 2 with ReadProjectPermission

use of ca.corefacility.bioinformatics.irida.security.permissions.project.ReadProjectPermission in project irida by phac-nml.

the class ReadSamplePermissionTest method setUp.

@Before
public void setUp() {
    sampleRepository = mock(SampleRepository.class);
    psjRepository = mock(ProjectSampleJoinRepository.class);
    readProjectPermission = mock(ReadProjectPermission.class);
    readSamplePermission = new ReadSamplePermission(sampleRepository, psjRepository, readProjectPermission);
}
Also used : SampleRepository(ca.corefacility.bioinformatics.irida.repositories.sample.SampleRepository) ReadProjectPermission(ca.corefacility.bioinformatics.irida.security.permissions.project.ReadProjectPermission) ProjectSampleJoinRepository(ca.corefacility.bioinformatics.irida.repositories.joins.project.ProjectSampleJoinRepository) ReadSamplePermission(ca.corefacility.bioinformatics.irida.security.permissions.sample.ReadSamplePermission) Before(org.junit.Before)

Example 3 with ReadProjectPermission

use of ca.corefacility.bioinformatics.irida.security.permissions.project.ReadProjectPermission in project irida by phac-nml.

the class ReadSequencingObjectPermissionTest method setUp.

@Before
public void setUp() {
    userRepository = mock(UserRepository.class);
    ssoRepository = mock(SampleSequencingObjectJoinRepository.class);
    sequencingObjectRepository = mock(SequencingObjectRepository.class);
    psjRepository = mock(ProjectSampleJoinRepository.class);
    sampleRepository = mock(SampleRepository.class);
    readProjectPermission = mock(ReadProjectPermission.class);
    samplePermission = new ReadSamplePermission(sampleRepository, psjRepository, readProjectPermission);
    permission = new ReadSequencingObjectPermission(sequencingObjectRepository, samplePermission, ssoRepository);
}
Also used : SampleRepository(ca.corefacility.bioinformatics.irida.repositories.sample.SampleRepository) ReadSequencingObjectPermission(ca.corefacility.bioinformatics.irida.security.permissions.files.ReadSequencingObjectPermission) ReadProjectPermission(ca.corefacility.bioinformatics.irida.security.permissions.project.ReadProjectPermission) UserRepository(ca.corefacility.bioinformatics.irida.repositories.user.UserRepository) ProjectSampleJoinRepository(ca.corefacility.bioinformatics.irida.repositories.joins.project.ProjectSampleJoinRepository) SequencingObjectRepository(ca.corefacility.bioinformatics.irida.repositories.sequencefile.SequencingObjectRepository) SampleSequencingObjectJoinRepository(ca.corefacility.bioinformatics.irida.repositories.joins.sample.SampleSequencingObjectJoinRepository) ReadSamplePermission(ca.corefacility.bioinformatics.irida.security.permissions.sample.ReadSamplePermission) Before(org.junit.Before)

Aggregations

ReadProjectPermission (ca.corefacility.bioinformatics.irida.security.permissions.project.ReadProjectPermission)3 Before (org.junit.Before)3 ProjectSampleJoinRepository (ca.corefacility.bioinformatics.irida.repositories.joins.project.ProjectSampleJoinRepository)2 SampleRepository (ca.corefacility.bioinformatics.irida.repositories.sample.SampleRepository)2 UserRepository (ca.corefacility.bioinformatics.irida.repositories.user.UserRepository)2 ReadSamplePermission (ca.corefacility.bioinformatics.irida.security.permissions.sample.ReadSamplePermission)2 ProjectRepository (ca.corefacility.bioinformatics.irida.repositories.ProjectRepository)1 ProjectUserJoinRepository (ca.corefacility.bioinformatics.irida.repositories.joins.project.ProjectUserJoinRepository)1 UserGroupProjectJoinRepository (ca.corefacility.bioinformatics.irida.repositories.joins.project.UserGroupProjectJoinRepository)1 SampleSequencingObjectJoinRepository (ca.corefacility.bioinformatics.irida.repositories.joins.sample.SampleSequencingObjectJoinRepository)1 SequencingObjectRepository (ca.corefacility.bioinformatics.irida.repositories.sequencefile.SequencingObjectRepository)1 UserGroupJoinRepository (ca.corefacility.bioinformatics.irida.repositories.user.UserGroupJoinRepository)1 ReadSequencingObjectPermission (ca.corefacility.bioinformatics.irida.security.permissions.files.ReadSequencingObjectPermission)1