diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java index 52ac134a7f02f5d22d8f5a07e669ad37330e444f..ad8c45f1af7c27d94bc9d7fcc7a5c4e33e3f7b52 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java @@ -28,7 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.ReturnVa import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetCodePredicate; -import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ListSampleCriteriaPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ProjectUpdatesPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleTechIdPredicate; @@ -203,7 +203,7 @@ public interface ICommonServer extends IServer public void registerSpaceRole( String sessionToken, RoleCode roleCode, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier identifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) GroupIdentifier identifier, Grantee grantee); /** @@ -223,7 +223,7 @@ public interface ICommonServer extends IServer public void deleteSpaceRole( String sessionToken, RoleCode roleCode, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier groupIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) GroupIdentifier identifier, Grantee grantee); /** @@ -265,7 +265,7 @@ public interface ICommonServer extends IServer public List<Experiment> listExperiments( final String sessionToken, ExperimentType experimentType, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier project); + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ProjectIdentifier project); /** * For given sample {@link TechId} returns the corresponding list of {@link ExternalData}. @@ -498,7 +498,7 @@ public interface ICommonServer extends IServer @DatabaseCreateOrDeleteModification(value = ObjectKind.PROJECT) public void registerProject( String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier projectIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ProjectIdentifier projectIdentifier, String description, String leaderId, Collection<NewAttachment> attachments); /** diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java index 0da8dc6a2eeba8e4a43f2db3b05d1923d8ce5f2a..3753580d571cd5192b7bbf3a9917d7f78298353e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java @@ -27,7 +27,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.ReturnVa import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetCodePredicate; -import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ListSampleCriteriaPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ListSamplesByPropertyPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewExperimentPredicate; @@ -86,7 +86,7 @@ public interface IETLLIMSService extends IServer, ISessionProvider @RolesAllowed(RoleSet.ETL_SERVER) public Experiment tryToGetExperiment( String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ExperimentIdentifier experimentIdentifier) + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ExperimentIdentifier experimentIdentifier) throws UserFailureException; /** @@ -213,7 +213,7 @@ public interface IETLLIMSService extends IServer, ISessionProvider @RolesAllowed(RoleSet.ETL_SERVER) public void registerDataSet( final String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) final ExperimentIdentifier experimentIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) final ExperimentIdentifier experimentIdentifier, final NewExternalData externalData) throws UserFailureException; /** diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java index 4960959eced589e57cda7f9181a9c37a3a060b52..038b0f2bd0474690ba6d30d04036534b131257d0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java @@ -36,18 +36,18 @@ public class ExperimentUpdatesPredicate extends AbstractPredicate<ExperimentUpda { private final ExperimentTechIdPredicate experimentTechIdPredicate; - private final GroupIdentifierPredicate groupPredicate; + private final SpaceIdentifierPredicate spacePredicate; public ExperimentUpdatesPredicate() { this.experimentTechIdPredicate = new ExperimentTechIdPredicate(); - this.groupPredicate = new GroupIdentifierPredicate(); + this.spacePredicate = new SpaceIdentifierPredicate(); } public final void init(IAuthorizationDataProvider provider) { experimentTechIdPredicate.init(provider); - groupPredicate.init(provider); + spacePredicate.init(provider); } @Override @@ -69,7 +69,7 @@ public class ExperimentUpdatesPredicate extends AbstractPredicate<ExperimentUpda { return status; } - status = groupPredicate.doEvaluation(person, allowedRoles, updates.getProjectIdentifier()); + status = spacePredicate.doEvaluation(person, allowedRoles, updates.getProjectIdentifier()); return status; } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java index b1431fb98c121b031d3a470e6871dd8c353ede37..f8035c1738537793d994d35b75694966130d3392 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java @@ -34,16 +34,16 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE; public class ListSamplesByPropertyPredicate extends AbstractPredicate<ListSamplesByPropertyCriteria> { - private final GroupIdentifierPredicate groupPredicate; + private final SpaceIdentifierPredicate spacePredicate; public ListSamplesByPropertyPredicate() { - this.groupPredicate = new GroupIdentifierPredicate(); + this.spacePredicate = new SpaceIdentifierPredicate(); } public final void init(IAuthorizationDataProvider provider) { - groupPredicate.init(provider); + spacePredicate.init(provider); } @Override @@ -56,7 +56,7 @@ public class ListSamplesByPropertyPredicate extends Status doEvaluation(final PersonPE person, final List<RoleWithIdentifier> allowedRoles, final ListSamplesByPropertyCriteria criteria) { - assert groupPredicate.initialized : "Predicate has not been initialized"; - return groupPredicate.doEvaluation(person, allowedRoles, criteria.getGroupIdentifier()); + assert spacePredicate.initialized : "Predicate has not been initialized"; + return spacePredicate.doEvaluation(person, allowedRoles, criteria.getGroupIdentifier()); } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentPredicate.java index d756cfdad295343def5a4c7c0f18e75dbe36bad1..dcb007fc8fb64046f8053bbe2591eacfd2004e40 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentPredicate.java @@ -31,7 +31,7 @@ public final class NewExperimentPredicate extends { public NewExperimentPredicate() { - super(new GroupIdentifierPredicate()); + super(new SpaceIdentifierPredicate()); } // diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NullableGroupIdentifierPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NullableGroupIdentifierPredicate.java index 94ae9934737e5e1bf61690e062d55b7ba12dbdfb..5d7edcd3b8419bfe19d95945a4dd27f0f91f4e5e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NullableGroupIdentifierPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NullableGroupIdentifierPredicate.java @@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.generic.shared.authorization.predicate; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier; /** - * An <code>IPredicate</code> implementation based on {@link GroupIdentifierPredicate} which allows + * An <code>IPredicate</code> implementation based on {@link SpaceIdentifierPredicate} which allows * the identifier to be null. * * @author Tomasz Pylak @@ -29,7 +29,7 @@ public class NullableGroupIdentifierPredicate extends { public NullableGroupIdentifierPredicate() { - super(new GroupIdentifierPredicate()); + super(new SpaceIdentifierPredicate()); } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java index 89030bab6e8182fdf18923dc322ac9fd3d5f0e10..959a0021a71c707ad5eb67d1dc31a859a4bdb4b1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java @@ -34,16 +34,16 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier; */ public class ProjectUpdatesPredicate extends AbstractPredicate<ProjectUpdatesDTO> { - private final GroupIdentifierPredicate groupPredicate; + private final SpaceIdentifierPredicate spacePredicate; public ProjectUpdatesPredicate() { - this.groupPredicate = new GroupIdentifierPredicate(); + this.spacePredicate = new SpaceIdentifierPredicate(); } public final void init(IAuthorizationDataProvider provider) { - groupPredicate.init(provider); + spacePredicate.init(provider); } @Override @@ -56,9 +56,9 @@ public class ProjectUpdatesPredicate extends AbstractPredicate<ProjectUpdatesDTO Status doEvaluation(final PersonPE person, final List<RoleWithIdentifier> allowedRoles, final ProjectUpdatesDTO updates) { - assert groupPredicate.initialized : "Predicate has not been initialized"; + assert spacePredicate.initialized : "Predicate has not been initialized"; Status status; - status = groupPredicate.doEvaluation(person, allowedRoles, updates.getIdentifier()); + status = spacePredicate.doEvaluation(person, allowedRoles, updates.getIdentifier()); if (status.equals(Status.OK) == false) { return status; @@ -69,7 +69,7 @@ public class ProjectUpdatesPredicate extends AbstractPredicate<ProjectUpdatesDTO GroupIdentifier newGroupIdentifier = new GroupIdentifier(updates.getIdentifier().getDatabaseInstanceCode(), newGroupCode); - status = groupPredicate.doEvaluation(person, allowedRoles, newGroupIdentifier); + status = spacePredicate.doEvaluation(person, allowedRoles, newGroupIdentifier); } return status; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java index 80d855c55991b6f7c0d0042e0182018f070ecb39..848a0fe98eabbde1ee4c31ef7677b1d6ecb89316 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java @@ -31,7 +31,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleOwnerIdentif */ public final class SampleOwnerIdentifierPredicate extends AbstractPredicate<SampleOwnerIdentifier> { - private final GroupIdentifierPredicate groupIdentifierPredicate; + private final SpaceIdentifierPredicate spacePredicate; private final DatabaseInstanceIdentifierPredicate databaseInstanceIdentifierPredicate; @@ -42,7 +42,7 @@ public final class SampleOwnerIdentifierPredicate extends AbstractPredicate<Samp public SampleOwnerIdentifierPredicate(boolean isReadAccess) { - groupIdentifierPredicate = new GroupIdentifierPredicate(); + spacePredicate = new SpaceIdentifierPredicate(); databaseInstanceIdentifierPredicate = new DatabaseInstanceIdentifierPredicate(isReadAccess); } @@ -52,7 +52,7 @@ public final class SampleOwnerIdentifierPredicate extends AbstractPredicate<Samp public final void init(IAuthorizationDataProvider provider) { - groupIdentifierPredicate.init(provider); + spacePredicate.init(provider); databaseInstanceIdentifierPredicate.init(provider); } @@ -72,7 +72,7 @@ public final class SampleOwnerIdentifierPredicate extends AbstractPredicate<Samp .getDatabaseInstanceLevel()); } else { - return groupIdentifierPredicate.doEvaluation(person, allowedRoles, value + return spacePredicate.doEvaluation(person, allowedRoles, value .getGroupLevel()); } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java index 1174ac7bd2090bc014b03d3e6e150e0762568e3d..36e0c0032021a72598b977e7f8792e89265bf9b3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java @@ -35,21 +35,21 @@ public class SampleUpdatesPredicate extends AbstractPredicate<SampleUpdatesDTO> { private final SampleTechIdPredicate sampleTechIdPredicate; - private final GroupIdentifierPredicate groupPredicate; + private final SpaceIdentifierPredicate spacePredicate; private final SampleOwnerIdentifierPredicate samplePredicate; public SampleUpdatesPredicate() { this.sampleTechIdPredicate = new SampleTechIdPredicate(); - this.groupPredicate = new GroupIdentifierPredicate(); + this.spacePredicate = new SpaceIdentifierPredicate(); this.samplePredicate = new SampleOwnerIdentifierPredicate(); } public final void init(IAuthorizationDataProvider provider) { sampleTechIdPredicate.init(provider); - groupPredicate.init(provider); + spacePredicate.init(provider); samplePredicate.init(provider); } @@ -73,7 +73,7 @@ public class SampleUpdatesPredicate extends AbstractPredicate<SampleUpdatesDTO> if (updates.getExperimentIdentifierOrNull() != null) { status = - groupPredicate.doEvaluation(person, allowedRoles, updates + spacePredicate.doEvaluation(person, allowedRoles, updates .getExperimentIdentifierOrNull()); if (status.equals(Status.OK) == false) return status; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicate.java similarity index 95% rename from openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicate.java rename to openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicate.java index 02acb0dfd411b66a4c6b29168f123640a08c875b..2bdb9c78e4384a53bcf186e8b7fec4417c910248 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicate.java @@ -30,9 +30,9 @@ import ch.systemsx.cisd.openbis.generic.shared.util.GroupCodeHelper; * * @author Christian Ribeaud */ -public class GroupIdentifierPredicate extends AbstractGroupPredicate<GroupIdentifier> +public class SpaceIdentifierPredicate extends AbstractGroupPredicate<GroupIdentifier> { - public GroupIdentifierPredicate() + public SpaceIdentifierPredicate() { } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/shared/IGenericServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/shared/IGenericServer.java index 7ac4533d6b17738fd6337996d3195bcacfb0f37e..c01ef8a8f9594bb4af8dc3efcfb7f5b780588ef0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/shared/IGenericServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/shared/IGenericServer.java @@ -31,7 +31,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetUpdatesPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ExperimentUpdatesPredicate; -import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewExperimentPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplePredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplesWithTypePredicate; @@ -98,7 +98,7 @@ public interface IGenericServer extends IServer @RolesAllowed(RoleSet.OBSERVER) public Experiment getExperimentInfo( String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ExperimentIdentifier identifier); + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ExperimentIdentifier identifier); /** * For given {@link TechId} returns the corresponding {@link Experiment}. diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected index 52ac134a7f02f5d22d8f5a07e669ad37330e444f..ad8c45f1af7c27d94bc9d7fcc7a5c4e33e3f7b52 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected @@ -28,7 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.ReturnVa import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetCodePredicate; -import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ListSampleCriteriaPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ProjectUpdatesPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleTechIdPredicate; @@ -203,7 +203,7 @@ public interface ICommonServer extends IServer public void registerSpaceRole( String sessionToken, RoleCode roleCode, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier identifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) GroupIdentifier identifier, Grantee grantee); /** @@ -223,7 +223,7 @@ public interface ICommonServer extends IServer public void deleteSpaceRole( String sessionToken, RoleCode roleCode, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier groupIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) GroupIdentifier identifier, Grantee grantee); /** @@ -265,7 +265,7 @@ public interface ICommonServer extends IServer public List<Experiment> listExperiments( final String sessionToken, ExperimentType experimentType, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier project); + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ProjectIdentifier project); /** * For given sample {@link TechId} returns the corresponding list of {@link ExternalData}. @@ -498,7 +498,7 @@ public interface ICommonServer extends IServer @DatabaseCreateOrDeleteModification(value = ObjectKind.PROJECT) public void registerProject( String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier projectIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ProjectIdentifier projectIdentifier, String description, String leaderId, Collection<NewAttachment> attachments); /** diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java.expected b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java.expected index 0da8dc6a2eeba8e4a43f2db3b05d1923d8ce5f2a..3753580d571cd5192b7bbf3a9917d7f78298353e 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java.expected +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java.expected @@ -27,7 +27,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.ReturnVa import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetCodePredicate; -import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ListSampleCriteriaPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ListSamplesByPropertyPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewExperimentPredicate; @@ -86,7 +86,7 @@ public interface IETLLIMSService extends IServer, ISessionProvider @RolesAllowed(RoleSet.ETL_SERVER) public Experiment tryToGetExperiment( String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ExperimentIdentifier experimentIdentifier) + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ExperimentIdentifier experimentIdentifier) throws UserFailureException; /** @@ -213,7 +213,7 @@ public interface IETLLIMSService extends IServer, ISessionProvider @RolesAllowed(RoleSet.ETL_SERVER) public void registerDataSet( final String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) final ExperimentIdentifier experimentIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) final ExperimentIdentifier experimentIdentifier, final NewExternalData externalData) throws UserFailureException; /** diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java index 12d073e4e5e6652238cf14d2b36ffea3efdc3aec..b6b3b4a1b2d49c0a7d21b77a35b4c465d0d6a871 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java @@ -35,7 +35,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE; /** * Test cases for corresponding {@link AbstractTechIdPredicate} class implementation. * - * @see GroupIdentifierPredicateTest + * @see SpaceIdentifierPredicateTest * @author Piotr Buczek */ public final class AbstractTechIdPredicateTest extends AuthorizationTestCase diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicateTest.java index a2b56b4731989bd0b771431f70d8e4ce58e0caba..18d60a6fb3b58ccbc8960a3c56fca8ddd67e6bc1 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicateTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicateTest.java @@ -42,7 +42,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleOwnerIdentif public class NewSamplesWithTypePredicateTest extends AuthorizationTestCase { - IPredicate<SampleOwnerIdentifier> delegate; + private IPredicate<SampleOwnerIdentifier> delegate; @Override @BeforeMethod diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicateTest.java similarity index 90% rename from openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicateTest.java rename to openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicateTest.java index 00a531fa5f48b766dc1a58f110829ec84df7ebf0..abf3a280580a7ee2aea0228c93aed24a4fc087b8 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicateTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicateTest.java @@ -31,16 +31,16 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier; /** - * Test cases for corresponding {@link GroupIdentifierPredicate} class. + * Test cases for corresponding {@link SpaceIdentifierPredicate} class. * * @author Christian Ribeaud */ -public final class GroupIdentifierPredicateTest extends AuthorizationTestCase +public final class SpaceIdentifierPredicateTest extends AuthorizationTestCase { @Test public final void testDoEvaluationWithoutDAOFactory() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); boolean fail = true; try { @@ -57,7 +57,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase @Test(expectedExceptions = UserFailureException.class) public final void testExceptionBecauseInstanceDoesNotExist() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); prepareProvider(INSTANCE_CODE, null, Collections.<GroupPE> emptyList()); predicate.init(provider); predicate.doEvaluation(createPerson(), createRoles(false), new GroupIdentifier( @@ -68,7 +68,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase @Test(expectedExceptions = UserFailureException.class) public final void testExceptionBecauseGroupDoesNotExist() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); prepareProvider(INSTANCE_CODE, createDatabaseInstance(), Collections.<GroupPE> emptyList()); predicate.init(provider); predicate.doEvaluation(createPerson(), createRoles(false), new GroupIdentifier( @@ -79,7 +79,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase @Test public final void testSuccessfulEvaluation() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); prepareProvider(INSTANCE_CODE, createDatabaseInstance(), createGroups()); predicate.init(provider); final Status evaluation = @@ -92,7 +92,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase @Test public final void testSuccessfulEvaluationWithHomeGroup() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); prepareProvider(INSTANCE_CODE, createDatabaseInstance(), createGroups()); predicate.init(provider); final PersonPE person = createPerson(); @@ -108,7 +108,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase @Test public final void testFailedEvaluation() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); prepareProvider(ANOTHER_INSTANCE_CODE, createAnotherDatabaseInstance(), createGroups()); predicate.init(provider); final Status evaluation = @@ -125,7 +125,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase public final void testAccessAnotherGroup() { final DatabaseInstancePE homeDatabaseInstance = createDatabaseInstance(); - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); final List<GroupPE> groups = createGroups(); groups.add(createGroup(ANOTHER_GROUP_CODE, homeDatabaseInstance)); prepareProvider(INSTANCE_CODE, createDatabaseInstance(), groups);