This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch 3192-simplify-permissions
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/3192-simplify-permissions by 
this push:
     new 7b7dff408b feat(#3192): Replace delete permissions with write
7b7dff408b is described below

commit 7b7dff408b5bfb528a1793c5a1d2fedb2ff8a79a
Author: Dominik Riemer <[email protected]>
AuthorDate: Wed Aug 28 16:55:17 2024 +0200

    feat(#3192): Replace delete permissions with write
---
 .../streampipes/model/client/user/Privilege.java    | 16 ----------------
 .../apache/streampipes/model/client/user/Role.java  |  9 ++-------
 .../streampipes/rest/impl/PipelineResource.java     |  2 +-
 .../rest/impl/connect/AdapterResource.java          |  2 +-
 .../impl/dashboard/AbstractDashboardResource.java   |  4 +---
 .../streampipes/rest/impl/dashboard/Dashboard.java  |  5 -----
 .../impl/datalake/DataLakeDashboardResource.java    |  5 -----
 .../rest/impl/pe/DataProcessorResource.java         |  2 +-
 .../streampipes/rest/impl/pe/DataSinkResource.java  |  2 +-
 .../rest/impl/pe/DataStreamResource.java            |  2 +-
 .../streampipes/rest/security/AuthConstants.java    |  9 ---------
 .../src/lib/model/gen/streampipes-model-client.ts   |  8 --------
 .../src/lib/model/gen/streampipes-model.ts          | 21 +--------------------
 .../overview/dashboard-overview.component.html      |  2 +-
 .../overview/dashboard-overview.component.ts        |  4 ----
 .../dashboard-toolbar.component.html                |  2 +-
 .../dashboard-toolbar.component.ts                  |  3 ---
 .../data-explorer-dashboard-panel.component.html    |  1 -
 .../data-explorer-dashboard-panel.component.ts      |  4 ----
 .../data-explorer-dashboard-overview.component.html |  2 +-
 .../data-explorer-data-view-overview.component.html |  2 +-
 .../overview/data-explorer-overview.directive.ts    |  4 ----
 .../actions/pipeline-actions.component.html         |  2 +-
 .../actions/pipeline-actions.component.ts           |  3 ---
 .../pipeline-details-expansion-panel.component.html |  1 -
 .../pipeline-details-expansion-panel.component.ts   |  3 ---
 .../pipeline-details.component.html                 |  1 -
 .../pipeline-details/pipeline-details.component.ts  |  4 ----
 .../pipeline-overview.component.html                |  2 +-
 .../pipeline-overview.component.ts                  |  4 ----
 30 files changed, 15 insertions(+), 116 deletions(-)

diff --git 
a/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/Privilege.java
 
b/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/Privilege.java
index 9b139f86b0..461ae617fd 100644
--- 
a/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/Privilege.java
+++ 
b/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/Privilege.java
@@ -24,37 +24,30 @@ public enum Privilege {
   // Pipelines
   PRIVILEGE_READ_PIPELINE(Constants.PRIVILEGE_READ_PIPELINE_VALUE),
   PRIVILEGE_WRITE_PIPELINE(Constants.PRIVILEGE_WRITE_PIPELINE_VALUE),
-  PRIVILEGE_DELETE_PIPELINE(Constants.PRIVILEGE_DELETE_PIPELINE_VALUE),
 
   // Adapters
   PRIVILEGE_READ_ADAPTER(Constants.PRIVILEGE_READ_ADAPTER_VALUE),
   PRIVILEGE_WRITE_ADAPTER(Constants.PRIVILEGE_WRITE_ADAPTER_VALUE),
-  PRIVILEGE_DELETE_ADAPTER(Constants.PRIVILEGE_DELETE_ADAPTER_VALUE),
 
   // Pipeline Elements
   
PRIVILEGE_READ_PIPELINE_ELEMENT(Constants.PRIVILEGE_READ_PIPELINE_ELEMENT_VALUE),
   
PRIVILEGE_WRITE_PIPELINE_ELEMENT(Constants.PRIVILEGE_WRITE_PIPELINE_ELEMENT_VALUE),
-  
PRIVILEGE_DELETE_PIPELINE_ELEMENT(Constants.PRIVILEGE_DELETE_PIPELINE_ELEMENT_VALUE),
 
   // Dashboard
   PRIVILEGE_READ_DASHBOARD(Constants.PRIVILEGE_READ_DASHBOARD_VALUE),
   PRIVILEGE_WRITE_DASHBOARD(Constants.PRIVILEGE_WRITE_DASHBOARD_VALUE),
-  PRIVILEGE_DELETE_DASHBOARD(Constants.PRIVILEGE_DELETE_DASHBOARD_VALUE),
 
   // Dashboard widget
   
PRIVILEGE_READ_DASHBOARD_WIDGET(Constants.PRIVILEGE_READ_DASHBOARD_WIDGET_VALUE),
   
PRIVILEGE_WRITE_DASHBOARD_WIDGET(Constants.PRIVILEGE_WRITE_DASHBOARD_WIDGET_VALUE),
-  
PRIVILEGE_DELETE_DASHBOARD_WIDGET(Constants.PRIVILEGE_DELETE_DASHBOARD_WIDGET_VALUE),
 
   // Data Explorer view
   
PRIVILEGE_READ_DATA_EXPLORER_VIEW(Constants.PRIVILEGE_READ_DATA_EXPLORER_VIEW_VALUE),
   
PRIVILEGE_WRITE_DATA_EXPLORER_VIEW(Constants.PRIVILEGE_WRITE_DATA_EXPLORER_VIEW_VALUE),
-  
PRIVILEGE_DELETE_DATA_EXPLORER_VIEW(Constants.PRIVILEGE_DELETE_DATA_EXPLORER_VIEW_VALUE),
 
   // Data Explorer widget
   
PRIVILEGE_READ_DATA_EXPLORER_WIDGET(Constants.PRIVILEGE_READ_DATA_EXPLORER_WIDGET_VALUE),
   
PRIVILEGE_WRITE_DATA_EXPLORER_WIDGET(Constants.PRIVILEGE_WRITE_DATA_EXPLORER_WIDGET_VALUE),
-  
PRIVILEGE_DELETE_DATA_EXPLORER_WIDGET(Constants.PRIVILEGE_DELETE_DATA_EXPLORER_WIDGET_VALUE),
 
   // Apps
   PRIVILEGE_READ_APPS(Constants.PRIVILEGE_READ_APPS_VALUE),
@@ -66,7 +59,6 @@ public enum Privilege {
   // FILES
   PRIVILEGE_READ_FILES(Constants.PRIVILEGE_READ_FILES_VALUE),
   PRIVILEGE_WRITE_FILES(Constants.PRIVILEGE_WRITE_FILES_VALUE),
-  PRIVILEGE_DELETE_FILES(Constants.PRIVILEGE_DELETE_FILES_VALUE),
 
   // ASSETS
   PRIVILEGE_READ_ASSETS(Constants.PRIVILEGE_READ_ASSETS_VALUE),
@@ -85,31 +77,24 @@ public enum Privilege {
   public static final class Constants {
     public static final String PRIVILEGE_READ_PIPELINE_VALUE = 
"PRIVILEGE_READ_PIPELINE";
     public static final String PRIVILEGE_WRITE_PIPELINE_VALUE = 
"PRIVILEGE_WRITE_PIPELINE";
-    public static final String PRIVILEGE_DELETE_PIPELINE_VALUE = 
"PRIVILEGE_DELETE_PIPELINE";
 
     public static final String PRIVILEGE_READ_ADAPTER_VALUE = 
"PRIVILEGE_READ_ADAPTER";
     public static final String PRIVILEGE_WRITE_ADAPTER_VALUE = 
"PRIVILEGE_WRITE_ADAPTER";
-    public static final String PRIVILEGE_DELETE_ADAPTER_VALUE = 
"PRIVILEGE_DELETE_ADAPTER";
 
     public static final String PRIVILEGE_READ_PIPELINE_ELEMENT_VALUE = 
"PRIVILEGE_READ_PIPELINE_ELEMENT";
     public static final String PRIVILEGE_WRITE_PIPELINE_ELEMENT_VALUE = 
"PRIVILEGE_WRITE_PIPELINE_ELEMENT";
-    public static final String PRIVILEGE_DELETE_PIPELINE_ELEMENT_VALUE = 
"PRIVILEGE_DELETE_PIPELINE_ELEMENT";
 
     public static final String PRIVILEGE_READ_DASHBOARD_VALUE = 
"PRIVILEGE_READ_DASHBOARD";
     public static final String PRIVILEGE_WRITE_DASHBOARD_VALUE = 
"PRIVILEGE_WRITE_DASHBOARD";
-    public static final String PRIVILEGE_DELETE_DASHBOARD_VALUE = 
"PRIVILEGE_DELETE_DASHBOARD";
 
     public static final String PRIVILEGE_READ_DASHBOARD_WIDGET_VALUE = 
"PRIVILEGE_READ_DASHBOARD_WIDGET";
     public static final String PRIVILEGE_WRITE_DASHBOARD_WIDGET_VALUE = 
"PRIVILEGE_WRITE_DASHBOARD_WIDGET";
-    public static final String PRIVILEGE_DELETE_DASHBOARD_WIDGET_VALUE = 
"PRIVILEGE_DELETE_DASHBOARD_WIDGET";
 
     public static final String PRIVILEGE_READ_DATA_EXPLORER_VIEW_VALUE = 
"PRIVILEGE_READ_DATA_EXPLORER_VIEW";
     public static final String PRIVILEGE_WRITE_DATA_EXPLORER_VIEW_VALUE = 
"PRIVILEGE_WRITE_DATA_EXPLORER_VIEW";
-    public static final String PRIVILEGE_DELETE_DATA_EXPLORER_VIEW_VALUE = 
"PRIVILEGE_DELETE_DATA_EXPLORER_VIEW";
 
     public static final String PRIVILEGE_READ_DATA_EXPLORER_WIDGET_VALUE = 
"PRIVILEGE_READ_DATA_EXPLORER_WIDGET";
     public static final String PRIVILEGE_WRITE_DATA_EXPLORER_WIDGET_VALUE = 
"PRIVILEGE_WRITE_DATA_EXPLORER_WIDGET";
-    public static final String PRIVILEGE_DELETE_DATA_EXPLORER_WIDGET_VALUE = 
"PRIVILEGE_DELETE_DATA_EXPLORER_WIDGET";
 
     public static final String PRIVILEGE_READ_APPS_VALUE = 
"PRIVILEGE_READ_APPS";
     public static final String PRIVILEGE_WRITE_APPS_VALUE = 
"PRIVILEGE_WRITE_APPS";
@@ -118,7 +103,6 @@ public enum Privilege {
 
     public static final String PRIVILEGE_READ_FILES_VALUE = 
"PRIVILEGE_READ_FILES";
     public static final String PRIVILEGE_WRITE_FILES_VALUE = 
"PRIVILEGE_WRITE_FILES";
-    public static final String PRIVILEGE_DELETE_FILES_VALUE = 
"PRIVILEGE_DELETE_FILES";
 
     public static final String PRIVILEGE_READ_ASSETS_VALUE = 
"PRIVILEGE_READ_ASSETS";
     public static final String PRIVILEGE_WRITE_ASSETS_VALUE = 
"PRIVILEGE_WRITE_ASSETS";
diff --git 
a/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/Role.java
 
b/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/Role.java
index 26f5d1c003..97bea7dd6e 100644
--- 
a/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/Role.java
+++ 
b/streampipes-model-client/src/main/java/org/apache/streampipes/model/client/user/Role.java
@@ -34,15 +34,13 @@ public enum Role {
       Constants.ROLE_PIPELINE_ADMIN_VALUE,
       Privilege.PRIVILEGE_READ_PIPELINE,
       Privilege.PRIVILEGE_WRITE_PIPELINE,
-      Privilege.PRIVILEGE_DELETE_PIPELINE,
       Privilege.PRIVILEGE_READ_PIPELINE_ELEMENT
   ),
 
   ROLE_DASHBOARD_ADMIN(
       Constants.ROLE_DASHBOARD_ADMIN_VALUE,
       Privilege.PRIVILEGE_READ_DASHBOARD,
-      Privilege.PRIVILEGE_WRITE_DASHBOARD,
-      Privilege.PRIVILEGE_DELETE_DASHBOARD
+      Privilege.PRIVILEGE_WRITE_DASHBOARD
   ),
 
   ROLE_DATA_EXPLORER_ADMIN(
@@ -51,15 +49,12 @@ public enum Role {
       Privilege.PRIVILEGE_READ_DATA_EXPLORER_WIDGET,
       Privilege.PRIVILEGE_WRITE_DATA_EXPLORER_VIEW,
       Privilege.PRIVILEGE_WRITE_DATA_EXPLORER_WIDGET,
-      Privilege.PRIVILEGE_DELETE_DATA_EXPLORER_VIEW,
-      Privilege.PRIVILEGE_DELETE_DATA_EXPLORER_WIDGET,
       Privilege.PRIVILEGE_READ_PIPELINE
   ),
   ROLE_CONNECT_ADMIN(
       Constants.ROLE_CONNECT_ADMIN_VALUE,
       Privilege.PRIVILEGE_WRITE_ADAPTER,
-      Privilege.PRIVILEGE_READ_ADAPTER,
-      Privilege.PRIVILEGE_DELETE_ADAPTER
+      Privilege.PRIVILEGE_READ_ADAPTER
   ),
 
   ROLE_DASHBOARD_USER(
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineResource.java
index a358839ec1..aa362aba16 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineResource.java
@@ -103,7 +103,7 @@ public class PipelineResource extends 
AbstractAuthGuardedRestResource {
       path = "/{pipelineId}",
       produces = MediaType.APPLICATION_JSON_VALUE)
   @Operation(summary = "Delete a pipeline with a given id", tags = 
{"Pipeline"})
-  @PreAuthorize(AuthConstants.HAS_DELETE_PIPELINE_PRIVILEGE)
+  @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_PRIVILEGE)
   public Message removeOwn(@PathVariable("pipelineId") String pipelineId) {
     PipelineManager.deletePipeline(pipelineId);
     return Notifications.success("Pipeline deleted");
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/AdapterResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/AdapterResource.java
index 6d70b8d6e6..a45d805037 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/AdapterResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/AdapterResource.java
@@ -159,7 +159,7 @@ public class AdapterResource extends 
AbstractAdapterResource<AdapterMasterManage
   }
 
   @DeleteMapping(path = "/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
-  @PreAuthorize(AuthConstants.HAS_DELETE_ADAPTER_PRIVILEGE)
+  @PreAuthorize(AuthConstants.HAS_WRITE_ADAPTER_PRIVILEGE)
   public ResponseEntity<?> deleteAdapter(@PathVariable("id") String elementId,
                                          @RequestParam(value = 
"deleteAssociatedPipelines", defaultValue = "false")
                                          boolean deleteAssociatedPipelines) {
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/dashboard/AbstractDashboardResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/dashboard/AbstractDashboardResource.java
index da77678804..4975399495 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/dashboard/AbstractDashboardResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/dashboard/AbstractDashboardResource.java
@@ -58,7 +58,7 @@ public abstract class AbstractDashboardResource extends 
AbstractAuthGuardedRestR
   }
 
   @DeleteMapping(path = "/{dashboardId}")
-  @PreAuthorize("this.hasDeleteAuthority() and hasPermission(#dashboardId, 
'DELETE')")
+  @PreAuthorize("this.hasWriteAuthority() and hasPermission(#dashboardId, 
'WRITE')")
   public ResponseEntity<Void> deleteDashboard(@PathVariable("dashboardId") 
String dashboardId) {
     getResourceManager().delete(dashboardId);
     return ok();
@@ -81,6 +81,4 @@ public abstract class AbstractDashboardResource extends 
AbstractAuthGuardedRestR
 
   public abstract boolean hasWriteAuthority();
 
-  public abstract boolean hasDeleteAuthority();
-
 }
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/dashboard/Dashboard.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/dashboard/Dashboard.java
index ac161a72d7..32c75abf79 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/dashboard/Dashboard.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/dashboard/Dashboard.java
@@ -43,9 +43,4 @@ public class Dashboard extends AbstractDashboardResource {
   public boolean hasWriteAuthority() {
     return 
isAdminOrHasAnyAuthority(Privilege.Constants.PRIVILEGE_WRITE_DASHBOARD_VALUE);
   }
-
-  @Override
-  public boolean hasDeleteAuthority() {
-    return 
isAdminOrHasAnyAuthority(Privilege.Constants.PRIVILEGE_DELETE_DASHBOARD_VALUE);
-  }
 }
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeDashboardResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeDashboardResource.java
index 3339bae6b0..a3b8133024 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeDashboardResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/datalake/DataLakeDashboardResource.java
@@ -45,9 +45,4 @@ public class DataLakeDashboardResource extends 
AbstractDashboardResource {
   public boolean hasWriteAuthority() {
     return 
isAdminOrHasAnyAuthority(Privilege.Constants.PRIVILEGE_WRITE_DATA_EXPLORER_VIEW_VALUE);
   }
-
-  @Override
-  public boolean hasDeleteAuthority() {
-    return 
isAdminOrHasAnyAuthority(Privilege.Constants.PRIVILEGE_DELETE_DATA_EXPLORER_VIEW_VALUE);
-  }
 }
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataProcessorResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataProcessorResource.java
index fdf3152752..641ae8c11a 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataProcessorResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataProcessorResource.java
@@ -58,7 +58,7 @@ public class DataProcessorResource extends 
AbstractAuthGuardedRestResource {
   }
 
   @DeleteMapping(path = "/{elementId}", produces = 
MediaType.APPLICATION_JSON_VALUE)
-  @PreAuthorize(AuthConstants.HAS_DELETE_PIPELINE_ELEMENT_PRIVILEGE)
+  @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE)
   public ResponseEntity<Message> removeOwn(@PathVariable("elementId") String 
elementId) {
     getDataProcessorResourceManager().delete(elementId);
     return 
constructSuccessMessage(NotificationType.STORAGE_SUCCESS.uiNotification());
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataSinkResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataSinkResource.java
index 8dc3964feb..377b7fe13b 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataSinkResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataSinkResource.java
@@ -58,7 +58,7 @@ public class DataSinkResource extends 
AbstractAuthGuardedRestResource {
   }
 
   @DeleteMapping(path = "/{elementId}", produces = 
MediaType.APPLICATION_JSON_VALUE)
-  @PreAuthorize(AuthConstants.HAS_DELETE_PIPELINE_ELEMENT_PRIVILEGE)
+  @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE)
   public ResponseEntity<Message> removeOwn(@PathVariable("elementId") String 
elementId) {
     getDataSinkResourceManager().delete(elementId);
     return 
constructSuccessMessage(NotificationType.STORAGE_SUCCESS.uiNotification());
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
index 70822846fe..2210e0563d 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
@@ -59,7 +59,7 @@ public class DataStreamResource extends 
AbstractAuthGuardedRestResource {
   }
 
   @DeleteMapping(path = "/{elementId}", produces = 
MediaType.APPLICATION_JSON_VALUE)
-  @PreAuthorize(AuthConstants.HAS_DELETE_PIPELINE_ELEMENT_PRIVILEGE)
+  @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE)
   public ResponseEntity<Message> delete(@PathVariable("elementId") String 
elementId) {
     getDataStreamResourceManager().delete(elementId);
     return 
constructSuccessMessage(NotificationType.STORAGE_SUCCESS.uiNotification());
diff --git 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/security/AuthConstants.java
 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/security/AuthConstants.java
index 124a074eac..409ae2e899 100644
--- 
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/security/AuthConstants.java
+++ 
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/security/AuthConstants.java
@@ -17,9 +17,6 @@
  */
 package org.apache.streampipes.rest.security;
 
-import static 
org.apache.streampipes.model.client.user.Privilege.Constants.PRIVILEGE_DELETE_ADAPTER_VALUE;
-import static 
org.apache.streampipes.model.client.user.Privilege.Constants.PRIVILEGE_DELETE_PIPELINE_ELEMENT_VALUE;
-import static 
org.apache.streampipes.model.client.user.Privilege.Constants.PRIVILEGE_DELETE_PIPELINE_VALUE;
 import static 
org.apache.streampipes.model.client.user.Privilege.Constants.PRIVILEGE_READ_ADAPTER_VALUE;
 import static 
org.apache.streampipes.model.client.user.Privilege.Constants.PRIVILEGE_READ_ASSETS_VALUE;
 import static 
org.apache.streampipes.model.client.user.Privilege.Constants.PRIVILEGE_READ_DASHBOARD_VALUE;
@@ -65,23 +62,17 @@ public class AuthConstants {
       BS + IS_ADMIN_ROLE + OR + HAS_ANY_AUTHORITY + 
PRIVILEGE_READ_PIPELINE_VALUE + Q + BE2;
   public static final String HAS_WRITE_PIPELINE_PRIVILEGE =
       BS + IS_ADMIN_ROLE + OR + HAS_ANY_AUTHORITY + 
PRIVILEGE_WRITE_PIPELINE_VALUE + Q + BE2;
-  public static final String HAS_DELETE_PIPELINE_PRIVILEGE =
-      BS + IS_ADMIN_ROLE + OR + HAS_ANY_AUTHORITY + 
PRIVILEGE_DELETE_PIPELINE_VALUE + Q + BE2;
 
   public static final String HAS_READ_PIPELINE_ELEMENT_PRIVILEGE =
       BS + IS_ADMIN_ROLE + OR + HAS_ANY_AUTHORITY + 
PRIVILEGE_READ_PIPELINE_ELEMENT_VALUE + Q + BE2;
 
   public static final String HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE =
       BS + IS_ADMIN_ROLE + OR + HAS_ANY_AUTHORITY + 
PRIVILEGE_WRITE_PIPELINE_ELEMENT_VALUE + Q + BE2;
-  public static final String HAS_DELETE_PIPELINE_ELEMENT_PRIVILEGE =
-      BS + IS_ADMIN_ROLE + OR + HAS_ANY_AUTHORITY + 
PRIVILEGE_DELETE_PIPELINE_ELEMENT_VALUE + Q + BE2;
 
   public static final String HAS_WRITE_ADAPTER_PRIVILEGE =
       BS + IS_ADMIN_ROLE + OR + HAS_ANY_AUTHORITY + 
PRIVILEGE_WRITE_ADAPTER_VALUE + Q + BE2;
   public static final String HAS_READ_ADAPTER_PRIVILEGE =
       BS + IS_ADMIN_ROLE + OR + HAS_ANY_AUTHORITY + 
PRIVILEGE_READ_ADAPTER_VALUE + Q + BE2;
-  public static final String HAS_DELETE_ADAPTER_PRIVILEGE =
-      BS + IS_ADMIN_ROLE + OR + HAS_ANY_AUTHORITY + 
PRIVILEGE_DELETE_ADAPTER_VALUE + Q + BE2;
 
   public static final String HAS_WRITE_DATA_EXPLORER_PRIVILEGE =
       BS + IS_ADMIN_ROLE + OR + HAS_ANY_AUTHORITY + 
PRIVILEGE_WRITE_DATA_EXPLORER_VIEW_VALUE + Q + BE2;
diff --git 
a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts
 
b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts
index 9b5f7f279b..f73edfc6aa 100644
--- 
a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts
+++ 
b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts
@@ -250,31 +250,23 @@ export type PrincipalType = 'USER_ACCOUNT' | 
'SERVICE_ACCOUNT' | 'GROUP';
 export type Privilege =
     | 'PRIVILEGE_READ_PIPELINE'
     | 'PRIVILEGE_WRITE_PIPELINE'
-    | 'PRIVILEGE_DELETE_PIPELINE'
     | 'PRIVILEGE_READ_ADAPTER'
     | 'PRIVILEGE_WRITE_ADAPTER'
-    | 'PRIVILEGE_DELETE_ADAPTER'
     | 'PRIVILEGE_READ_PIPELINE_ELEMENT'
     | 'PRIVILEGE_WRITE_PIPELINE_ELEMENT'
-    | 'PRIVILEGE_DELETE_PIPELINE_ELEMENT'
     | 'PRIVILEGE_READ_DASHBOARD'
     | 'PRIVILEGE_WRITE_DASHBOARD'
-    | 'PRIVILEGE_DELETE_DASHBOARD'
     | 'PRIVILEGE_READ_DASHBOARD_WIDGET'
     | 'PRIVILEGE_WRITE_DASHBOARD_WIDGET'
-    | 'PRIVILEGE_DELETE_DASHBOARD_WIDGET'
     | 'PRIVILEGE_READ_DATA_EXPLORER_VIEW'
     | 'PRIVILEGE_WRITE_DATA_EXPLORER_VIEW'
-    | 'PRIVILEGE_DELETE_DATA_EXPLORER_VIEW'
     | 'PRIVILEGE_READ_DATA_EXPLORER_WIDGET'
     | 'PRIVILEGE_WRITE_DATA_EXPLORER_WIDGET'
-    | 'PRIVILEGE_DELETE_DATA_EXPLORER_WIDGET'
     | 'PRIVILEGE_READ_APPS'
     | 'PRIVILEGE_WRITE_APPS'
     | 'PRIVILEGE_READ_NOTIFICATIONS'
     | 'PRIVILEGE_READ_FILES'
     | 'PRIVILEGE_WRITE_FILES'
-    | 'PRIVILEGE_DELETE_FILES'
     | 'PRIVILEGE_READ_ASSETS'
     | 'PRIVILEGE_WRITE_ASSETS'
     | 'PRIVILEGE_READ_GENERIC_STORAGE'
diff --git 
a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
 
b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
index c84f23c159..21ac1ce8fe 100644
--- 
a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
+++ 
b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts
@@ -1,26 +1,7 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
 /* tslint:disable */
 /* eslint-disable */
 // @ts-nocheck
-// Generated using typescript-generator version 3.2.1263 on 2024-08-27 
18:35:51.
+// Generated using typescript-generator version 3.2.1263 on 2024-08-28 
16:22:24.
 
 export class NamedStreamPipesEntity implements Storable {
     '@class':
diff --git 
a/ui/src/app/dashboard/components/overview/dashboard-overview.component.html 
b/ui/src/app/dashboard/components/overview/dashboard-overview.component.html
index d7937055ae..b9ba46abf5 100644
--- a/ui/src/app/dashboard/components/overview/dashboard-overview.component.html
+++ b/ui/src/app/dashboard/components/overview/dashboard-overview.component.html
@@ -140,7 +140,7 @@
                                 mat-icon-button
                                 matTooltip="Delete dashboard"
                                 color="accent"
-                                *ngIf="hasDashboardDeletePrivileges"
+                                *ngIf="hasDashboardWritePrivileges"
                                 (click)="openDeleteDashboardDialog(element)"
                             >
                                 <i class="material-icons">delete</i>
diff --git 
a/ui/src/app/dashboard/components/overview/dashboard-overview.component.ts 
b/ui/src/app/dashboard/components/overview/dashboard-overview.component.ts
index 919e2621f1..946812af5c 100644
--- a/ui/src/app/dashboard/components/overview/dashboard-overview.component.ts
+++ b/ui/src/app/dashboard/components/overview/dashboard-overview.component.ts
@@ -48,7 +48,6 @@ export class DashboardOverviewComponent implements OnInit {
 
     isAdmin = false;
     hasDashboardWritePrivileges = false;
-    hasDashboardDeletePrivileges = false;
 
     constructor(
         private dashboardService: DashboardService,
@@ -69,9 +68,6 @@ export class DashboardOverviewComponent implements OnInit {
             this.hasDashboardWritePrivileges = this.authService.hasRole(
                 UserPrivilege.PRIVILEGE_WRITE_DASHBOARD,
             );
-            this.hasDashboardDeletePrivileges = this.authService.hasRole(
-                UserPrivilege.PRIVILEGE_DELETE_DASHBOARD,
-            );
             this.displayedColumns = ['name', 'actions'];
         });
         this.getDashboards();
diff --git 
a/ui/src/app/data-explorer/components/dashboard/dashboard-toolbar/dashboard-toolbar.component.html
 
b/ui/src/app/data-explorer/components/dashboard/dashboard-toolbar/dashboard-toolbar.component.html
index 274482cadc..ee4b95d400 100644
--- 
a/ui/src/app/data-explorer/components/dashboard/dashboard-toolbar/dashboard-toolbar.component.html
+++ 
b/ui/src/app/data-explorer/components/dashboard/dashboard-toolbar/dashboard-toolbar.component.html
@@ -129,7 +129,7 @@
         </button>
         <button
             mat-menu-item
-            *ngIf="hasDataExplorerDeletePrivileges"
+            *ngIf="hasDataExplorerWritePrivileges"
             (click)="deleteDashboardEmitter.emit()"
         >
             <mat-icon>clear</mat-icon>
diff --git 
a/ui/src/app/data-explorer/components/dashboard/dashboard-toolbar/dashboard-toolbar.component.ts
 
b/ui/src/app/data-explorer/components/dashboard/dashboard-toolbar/dashboard-toolbar.component.ts
index 365463f26c..7c24498680 100644
--- 
a/ui/src/app/data-explorer/components/dashboard/dashboard-toolbar/dashboard-toolbar.component.ts
+++ 
b/ui/src/app/data-explorer/components/dashboard/dashboard-toolbar/dashboard-toolbar.component.ts
@@ -40,9 +40,6 @@ export class DataExplorerDashboardToolbarComponent {
     @Input()
     hasDataExplorerWritePrivileges: boolean;
 
-    @Input()
-    hasDataExplorerDeletePrivileges: boolean;
-
     @Input()
     timeSettings: TimeSettings;
 
diff --git 
a/ui/src/app/data-explorer/components/dashboard/data-explorer-dashboard-panel.component.html
 
b/ui/src/app/data-explorer/components/dashboard/data-explorer-dashboard-panel.component.html
index d7f084a06e..b98fe933a4 100644
--- 
a/ui/src/app/data-explorer/components/dashboard/data-explorer-dashboard-panel.component.html
+++ 
b/ui/src/app/data-explorer/components/dashboard/data-explorer-dashboard-panel.component.html
@@ -26,7 +26,6 @@
             [dashboard]="dashboard"
             [editMode]="editMode"
             [(viewMode)]="viewMode"
-            [hasDataExplorerDeletePrivileges]="hasDataExplorerDeletePrivileges"
             [hasDataExplorerWritePrivileges]="hasDataExplorerWritePrivileges"
             [timeRangeVisible]="timeRangeVisible"
             [timeSettings]="timeSettings"
diff --git 
a/ui/src/app/data-explorer/components/dashboard/data-explorer-dashboard-panel.component.ts
 
b/ui/src/app/data-explorer/components/dashboard/data-explorer-dashboard-panel.component.ts
index a0ec0b773e..7b4277ba9a 100644
--- 
a/ui/src/app/data-explorer/components/dashboard/data-explorer-dashboard-panel.component.ts
+++ 
b/ui/src/app/data-explorer/components/dashboard/data-explorer-dashboard-panel.component.ts
@@ -72,7 +72,6 @@ export class DataExplorerDashboardPanelComponent implements 
OnInit, OnDestroy {
     dashboardSlide: DataExplorerDashboardSlideViewComponent;
 
     hasDataExplorerWritePrivileges = false;
-    hasDataExplorerDeletePrivileges = false;
 
     public items: Dashboard[];
 
@@ -106,9 +105,6 @@ export class DataExplorerDashboardPanelComponent implements 
OnInit, OnDestroy {
             this.hasDataExplorerWritePrivileges = this.authService.hasRole(
                 UserPrivilege.PRIVILEGE_WRITE_DATA_EXPLORER_VIEW,
             );
-            this.hasDataExplorerDeletePrivileges = this.authService.hasRole(
-                UserPrivilege.PRIVILEGE_DELETE_DATA_EXPLORER_VIEW,
-            );
             if (queryParams.editMode && this.hasDataExplorerWritePrivileges) {
                 this.editMode = true;
             }
diff --git 
a/ui/src/app/data-explorer/components/overview/data-explorer-dashboard-overview/data-explorer-dashboard-overview.component.html
 
b/ui/src/app/data-explorer/components/overview/data-explorer-dashboard-overview/data-explorer-dashboard-overview.component.html
index 7913b3321b..28e1b8c683 100644
--- 
a/ui/src/app/data-explorer/components/overview/data-explorer-dashboard-overview/data-explorer-dashboard-overview.component.html
+++ 
b/ui/src/app/data-explorer/components/overview/data-explorer-dashboard-overview/data-explorer-dashboard-overview.component.html
@@ -101,7 +101,7 @@
                             mat-icon-button
                             color="accent"
                             matTooltip="Delete data view"
-                            *ngIf="hasDataExplorerDeletePrivileges"
+                            *ngIf="hasDataExplorerWritePrivileges"
                             [attr.data-cy]="'delete-dashboard-' + element.name"
                             (click)="openDeleteDashboardDialog(element)"
                         >
diff --git 
a/ui/src/app/data-explorer/components/overview/data-explorer-data-view-overview/data-explorer-data-view-overview.component.html
 
b/ui/src/app/data-explorer/components/overview/data-explorer-data-view-overview/data-explorer-data-view-overview.component.html
index 65dfd2af0c..4ce0688254 100644
--- 
a/ui/src/app/data-explorer/components/overview/data-explorer-data-view-overview/data-explorer-data-view-overview.component.html
+++ 
b/ui/src/app/data-explorer/components/overview/data-explorer-data-view-overview/data-explorer-data-view-overview.component.html
@@ -97,7 +97,7 @@
                             mat-icon-button
                             color="accent"
                             matTooltip="Delete data view"
-                            *ngIf="hasDataExplorerDeletePrivileges"
+                            *ngIf="hasDataExplorerWritePrivileges"
                             [attr.data-cy]="
                                 'delete-data-view-' +
                                 element.baseAppearanceConfig.widgetTitle
diff --git 
a/ui/src/app/data-explorer/components/overview/data-explorer-overview.directive.ts
 
b/ui/src/app/data-explorer/components/overview/data-explorer-overview.directive.ts
index 527d43a753..fa70f023a4 100644
--- 
a/ui/src/app/data-explorer/components/overview/data-explorer-overview.directive.ts
+++ 
b/ui/src/app/data-explorer/components/overview/data-explorer-overview.directive.ts
@@ -31,7 +31,6 @@ export abstract class SpDataExplorerOverviewDirective
     isAdmin = false;
 
     public hasDataExplorerWritePrivileges = false;
-    public hasDataExplorerDeletePrivileges = false;
 
     authSubscription: Subscription;
 
@@ -48,9 +47,6 @@ export abstract class SpDataExplorerOverviewDirective
                 this.hasDataExplorerWritePrivileges = this.authService.hasRole(
                     UserPrivilege.PRIVILEGE_WRITE_DATA_EXPLORER_VIEW,
                 );
-                this.hasDataExplorerDeletePrivileges = 
this.authService.hasRole(
-                    UserPrivilege.PRIVILEGE_DELETE_DATA_EXPLORER_VIEW,
-                );
                 this.isAdmin = user.roles.indexOf(UserRole.ROLE_ADMIN) > -1;
                 this.afterInit();
             },
diff --git 
a/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/actions/pipeline-actions.component.html
 
b/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/actions/pipeline-actions.component.html
index 3f60c319ad..b409532420 100644
--- 
a/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/actions/pipeline-actions.component.html
+++ 
b/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/actions/pipeline-actions.component.html
@@ -67,7 +67,7 @@
             color="accent"
             matTooltip="Delete Pipeline"
             matTooltipPosition="above"
-            [disabled]="!hasDeletePipelinePrivileges"
+            [disabled]="!hasWritePipelinePrivileges"
             (click)="
                 pipelineOperationsService.showDeleteDialog(
                     pipeline,
diff --git 
a/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/actions/pipeline-actions.component.ts
 
b/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/actions/pipeline-actions.component.ts
index 8b22521a6b..a50dc89496 100644
--- 
a/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/actions/pipeline-actions.component.ts
+++ 
b/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/actions/pipeline-actions.component.ts
@@ -32,9 +32,6 @@ export class PipelineActionsComponent implements OnInit {
     @Input()
     pipeline: Pipeline;
 
-    @Input()
-    hasDeletePipelinePrivileges: boolean;
-
     @Input()
     hasWritePipelinePrivileges: boolean;
 
diff --git 
a/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/pipeline-details-expansion-panel.component.html
 
b/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/pipeline-details-expansion-panel.component.html
index 5a3dc3eb26..848ae64550 100644
--- 
a/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/pipeline-details-expansion-panel.component.html
+++ 
b/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/pipeline-details-expansion-panel.component.html
@@ -49,7 +49,6 @@
             (reloadPipelineEmitter)="reloadPipelineEmitter.emit()"
             [pipeline]="pipeline"
             [hasWritePipelinePrivileges]="hasWritePipelinePrivileges"
-            [hasDeletePipelinePrivileges]="hasDeletePipelinePrivileges"
         >
         </sp-pipeline-actions>
     </mat-expansion-panel>
diff --git 
a/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/pipeline-details-expansion-panel.component.ts
 
b/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/pipeline-details-expansion-panel.component.ts
index a5777ddda5..fbef11f5bf 100644
--- 
a/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/pipeline-details-expansion-panel.component.ts
+++ 
b/ui/src/app/pipeline-details/components/pipeline-details-expansion-panel/pipeline-details-expansion-panel.component.ts
@@ -34,9 +34,6 @@ export class PipelineDetailsExpansionPanelComponent 
implements OnInit {
     @Input()
     logInfo: Record<string, SpLogEntry[]>;
 
-    @Input()
-    hasDeletePipelinePrivileges: boolean;
-
     @Input()
     hasWritePipelinePrivileges: boolean;
 
diff --git a/ui/src/app/pipeline-details/pipeline-details.component.html 
b/ui/src/app/pipeline-details/pipeline-details.component.html
index 7a9dd181f3..500885bccd 100644
--- a/ui/src/app/pipeline-details/pipeline-details.component.html
+++ b/ui/src/app/pipeline-details/pipeline-details.component.html
@@ -45,7 +45,6 @@
             <div class="expansion-panel" fxFlex="100" fxLayout="column">
                 <sp-pipeline-details-expansion-panel
                     [hasWritePipelinePrivileges]="hasPipelineWritePrivileges"
-                    [hasDeletePipelinePrivileges]="hasPipelineDeletePrivileges"
                     (reloadPipelineEmitter)="loadPipeline()"
                     [logInfo]="logInfo"
                     [pipeline]="pipeline"
diff --git a/ui/src/app/pipeline-details/pipeline-details.component.ts 
b/ui/src/app/pipeline-details/pipeline-details.component.ts
index 47e419afee..97c070b1b9 100644
--- a/ui/src/app/pipeline-details/pipeline-details.component.ts
+++ b/ui/src/app/pipeline-details/pipeline-details.component.ts
@@ -48,7 +48,6 @@ import { NGX_LOADING_BAR_IGNORED } from 
'@ngx-loading-bar/http-client';
 })
 export class SpPipelineDetailsComponent implements OnInit, OnDestroy {
     hasPipelineWritePrivileges = false;
-    hasPipelineDeletePrivileges = false;
 
     currentPipelineId: string;
 
@@ -83,9 +82,6 @@ export class SpPipelineDetailsComponent implements OnInit, 
OnDestroy {
             this.hasPipelineWritePrivileges = this.authService.hasRole(
                 UserPrivilege.PRIVILEGE_WRITE_PIPELINE,
             );
-            this.hasPipelineDeletePrivileges = this.authService.hasRole(
-                UserPrivilege.PRIVILEGE_DELETE_PIPELINE,
-            );
             const pipelineId = this.activatedRoute.snapshot.params.pipelineId;
             if (pipelineId) {
                 this.currentPipelineId = pipelineId;
diff --git 
a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
 
b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
index 78d0c8a4c4..08f1689173 100644
--- 
a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
+++ 
b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.html
@@ -199,7 +199,7 @@
                     mat-icon-button
                     matTooltip="Delete pipeline"
                     matTooltipPosition="above"
-                    *ngIf="hasPipelineDeletePrivileges"
+                    *ngIf="hasPipelineWritePrivileges"
                     (click)="
                         pipelineOperationsService.showDeleteDialog(
                             pipeline,
diff --git 
a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
 
b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
index aa78ffac1c..d0dae89fca 100644
--- 
a/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
+++ 
b/ui/src/app/pipelines/components/pipeline-overview/pipeline-overview.component.ts
@@ -66,7 +66,6 @@ export class PipelineOverviewComponent implements OnInit, 
OnDestroy {
 
     isAdmin = false;
     hasPipelineWritePrivileges = false;
-    hasPipelineDeletePrivileges = false;
 
     userSub: Subscription;
 
@@ -85,9 +84,6 @@ export class PipelineOverviewComponent implements OnInit, 
OnDestroy {
             this.hasPipelineWritePrivileges = this.authService.hasRole(
                 UserPrivilege.PRIVILEGE_WRITE_PIPELINE,
             );
-            this.hasPipelineDeletePrivileges = this.authService.hasRole(
-                UserPrivilege.PRIVILEGE_DELETE_PIPELINE,
-            );
         });
         this.toggleRunningOperation = this.toggleRunningOperation.bind(this);
     }


Reply via email to