RedirectController into auto config as default and null pointer fix. (#621)
* Vaadin patch and redirect controller to auto config. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix potential null pointer. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * revert Vaadin update. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Conditional on missing bean. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix on permission checks. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix permission checks. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com> * Fix nested cascade on delete. Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -121,8 +121,9 @@ public abstract class AbstractJpaBaseEntity implements BaseEntity {
|
||||
}
|
||||
|
||||
private boolean isController() {
|
||||
return SecurityContextHolder.getContext().getAuthentication()
|
||||
.getDetails() instanceof TenantAwareAuthenticationDetails
|
||||
return SecurityContextHolder.getContext().getAuthentication() != null
|
||||
&& SecurityContextHolder.getContext().getAuthentication()
|
||||
.getDetails() instanceof TenantAwareAuthenticationDetails
|
||||
&& ((TenantAwareAuthenticationDetails) SecurityContextHolder.getContext().getAuthentication()
|
||||
.getDetails()).isController();
|
||||
}
|
||||
|
||||
@@ -72,8 +72,9 @@ public class JpaRolloutGroup extends AbstractJpaNamedEntity implements RolloutGr
|
||||
CascadeType.PERSIST }, targetEntity = RolloutTargetGroup.class)
|
||||
private List<RolloutTargetGroup> rolloutTargetGroup;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "parent_id", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_rolloutgroup_rolloutgroup"))
|
||||
// No foreign key to avoid to many nested cascades on delete which some DBs cannot handle
|
||||
@ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST })
|
||||
@JoinColumn(name = "parent_id")
|
||||
private JpaRolloutGroup parent;
|
||||
|
||||
@Column(name = "success_condition", nullable = false)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
alter table sp_rolloutgroup drop constraint fk_rolloutgroup_rolloutgroup;
|
||||
@@ -0,0 +1 @@
|
||||
alter table sp_rolloutgroup drop FOREIGN KEY fk_rolloutgroup_rolloutgroup;
|
||||
Reference in New Issue
Block a user