Deleted rollouts are immutable (#475)

* Update throws read only exception if rollout is in deleting or deleted
state.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix typo.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2017-04-05 17:15:59 +02:00
committed by GitHub
parent 6f0b25fb44
commit a5a505024b
4 changed files with 40 additions and 13 deletions

View File

@@ -19,6 +19,7 @@ import org.eclipse.hawkbit.repository.builder.RolloutGroupCreate;
import org.eclipse.hawkbit.repository.builder.RolloutUpdate;
import org.eclipse.hawkbit.repository.exception.ConstraintViolationException;
import org.eclipse.hawkbit.repository.exception.EntityNotFoundException;
import org.eclipse.hawkbit.repository.exception.EntityReadOnlyException;
import org.eclipse.hawkbit.repository.exception.RSQLParameterSyntaxException;
import org.eclipse.hawkbit.repository.exception.RSQLParameterUnsupportedFieldException;
import org.eclipse.hawkbit.repository.exception.RolloutIllegalStateException;
@@ -371,6 +372,9 @@ public interface RolloutManagement {
*
* @throws EntityNotFoundException
* if rollout or DS with given IDs do not exist
* @throws EntityReadOnlyException
* if rollout is in soft deleted state, i.e. only kept as
* reference
*
*/
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_ROLLOUT_MANAGEMENT_WRITE)