diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ConfigurationController.java b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ConfigurationController.java index f2e43dc1..dc443c83 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ConfigurationController.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ConfigurationController.java @@ -64,7 +64,7 @@ public class ConfigurationController extends ReadonlyEntityController this.configurationDAO.saveToHistory(config.configurationNodeId)) .flatMap(this.userActivityLogDAO::logSaveToHistory) .getOrThrow(); @@ -78,7 +78,7 @@ public class ConfigurationController extends ReadonlyEntityController this.configurationDAO.undo(config.configurationNodeId)) .flatMap(this.userActivityLogDAO::logUndo) .getOrThrow(); @@ -94,7 +94,7 @@ public class ConfigurationController extends ReadonlyEntityController this.configurationDAO.restoreToVersion(configurationNodeId, config.getId())) .getOrThrow(); } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ReadonlyEntityController.java b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ReadonlyEntityController.java index 8d5620d3..60027ccd 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ReadonlyEntityController.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/ReadonlyEntityController.java @@ -12,7 +12,6 @@ import javax.validation.Valid; import org.springframework.util.MultiValueMap; -import ch.ethz.seb.sebserver.gbl.api.EntityType; import ch.ethz.seb.sebserver.gbl.api.POSTMapper; import ch.ethz.seb.sebserver.gbl.api.authorization.PrivilegeType; import ch.ethz.seb.sebserver.gbl.model.Entity; @@ -70,7 +69,7 @@ public abstract class ReadonlyEntityController checkModifyAccess(final T entity) { throw new PermissionDeniedException( - EntityType.CLIENT_EVENT, + getGrantEntityType(), PrivilegeType.MODIFY, this.authorization.getUserService().getCurrentUser().uuid()); } @@ -86,7 +85,7 @@ public abstract class ReadonlyEntityController checkWriteAccess(final T entity) { throw new PermissionDeniedException( - EntityType.CLIENT_EVENT, + getGrantEntityType(), PrivilegeType.WRITE, this.authorization.getUserService().getCurrentUser().uuid()); } @@ -94,7 +93,7 @@ public abstract class ReadonlyEntityController checkCreateAccess(final M entity) { throw new PermissionDeniedException( - EntityType.CLIENT_EVENT, + getGrantEntityType(), PrivilegeType.WRITE, this.authorization.getUserService().getCurrentUser().uuid()); }