Skip to content
Snippets Groups Projects
Commit 4c5f8e79 authored by buczekp's avatar buczekp
Browse files

[LMS-1434] fixed

SVN: 15292
parent 10cdf7e7
No related branches found
No related tags found
No related merge requests found
...@@ -31,12 +31,12 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; ...@@ -31,12 +31,12 @@ 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.annotation.RolesAllowed;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetUpdatesPredicate; 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.ExperimentUpdatesPredicate;
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.NewExperimentPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplePredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplePredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplesWithTypePredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplesWithTypePredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleTechIdPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleTechIdPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleUpdatesPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleUpdatesPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.DataSetTechIdPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.DataSetTechIdPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.ExperimentTechIdPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.ExperimentTechIdPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.ProjectTechIdPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.ProjectTechIdPredicate;
...@@ -155,11 +155,13 @@ public interface IGenericServer extends IServer ...@@ -155,11 +155,13 @@ public interface IGenericServer extends IServer
throws UserFailureException; throws UserFailureException;
/** /**
* Registers experiment. * Registers experiment. At the same time samples may be registered or updated.
*/ */
@Transactional @Transactional
@RolesAllowed(RoleSet.USER) @RolesAllowed(RoleSet.USER)
@DatabaseCreateOrDeleteModification(value = ObjectKind.EXPERIMENT) @DatabaseCreateOrDeleteModification(value =
{ ObjectKind.EXPERIMENT, ObjectKind.SAMPLE })
@DatabaseUpdateModification(value = ObjectKind.SAMPLE)
public void registerExperiment( public void registerExperiment(
String sessionToken, String sessionToken,
@AuthorizationGuard(guardClass = NewExperimentPredicate.class) final NewExperiment experiment, @AuthorizationGuard(guardClass = NewExperimentPredicate.class) final NewExperiment experiment,
......
...@@ -31,12 +31,12 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; ...@@ -31,12 +31,12 @@ 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.annotation.RolesAllowed;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetUpdatesPredicate; 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.ExperimentUpdatesPredicate;
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.NewExperimentPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplePredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplePredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplesWithTypePredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplesWithTypePredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleTechIdPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleTechIdPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleUpdatesPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleUpdatesPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.DataSetTechIdPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.DataSetTechIdPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.ExperimentTechIdPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.ExperimentTechIdPredicate;
import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.ProjectTechIdPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractTechIdPredicate.ProjectTechIdPredicate;
...@@ -155,11 +155,13 @@ public interface IGenericServer extends IServer ...@@ -155,11 +155,13 @@ public interface IGenericServer extends IServer
throws UserFailureException; throws UserFailureException;
/** /**
* Registers experiment. * Registers experiment. At the same time samples may be registered or updated.
*/ */
@Transactional @Transactional
@RolesAllowed(RoleSet.USER) @RolesAllowed(RoleSet.USER)
@DatabaseCreateOrDeleteModification(value = ObjectKind.EXPERIMENT) @DatabaseCreateOrDeleteModification(value =
{ ObjectKind.EXPERIMENT, ObjectKind.SAMPLE })
@DatabaseUpdateModification(value = ObjectKind.SAMPLE)
public void registerExperiment( public void registerExperiment(
String sessionToken, String sessionToken,
@AuthorizationGuard(guardClass = NewExperimentPredicate.class) final NewExperiment experiment, @AuthorizationGuard(guardClass = NewExperimentPredicate.class) final NewExperiment experiment,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment