You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/11/29 13:33:35 UTC
[streampipes] branch dev updated: [hotfix] Allow data explorer admin role to remove widgets
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 01a9bb622 [hotfix] Allow data explorer admin role to remove widgets
01a9bb622 is described below
commit 01a9bb62290a300af58da5583d02d1e2870ddc06
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Tue Nov 29 14:33:25 2022 +0100
[hotfix] Allow data explorer admin role to remove widgets
---
.../components/widget/data-explorer-dashboard-widget.component.html | 2 +-
.../components/widget/data-explorer-dashboard-widget.component.ts | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/ui/src/app/data-explorer/components/widget/data-explorer-dashboard-widget.component.html b/ui/src/app/data-explorer/components/widget/data-explorer-dashboard-widget.component.html
index 6238ec6d2..4eede05ef 100644
--- a/ui/src/app/data-explorer/components/widget/data-explorer-dashboard-widget.component.html
+++ b/ui/src/app/data-explorer/components/widget/data-explorer-dashboard-widget.component.html
@@ -79,7 +79,7 @@
mat-icon-button
(click)="removeWidget()"
matTooltip="Delete widget"
- *ngIf="editMode && hasDataExplorerDeletePrivileges"
+ *ngIf="editMode && hasDataExplorerWritePrivileges"
[attr.data-cy]="'remove-' + configuredWidget.baseAppearanceConfig.widgetTitle">
<mat-icon>clear</mat-icon>
</button>
diff --git a/ui/src/app/data-explorer/components/widget/data-explorer-dashboard-widget.component.ts b/ui/src/app/data-explorer/components/widget/data-explorer-dashboard-widget.component.ts
index 59f961469..22f684815 100644
--- a/ui/src/app/data-explorer/components/widget/data-explorer-dashboard-widget.component.ts
+++ b/ui/src/app/data-explorer/components/widget/data-explorer-dashboard-widget.component.ts
@@ -98,7 +98,6 @@ export class DataExplorerDashboardWidgetComponent implements OnInit, OnDestroy {
loadingTime = 0;
hasDataExplorerWritePrivileges = false;
- hasDataExplorerDeletePrivileges = false;
authSubscription: Subscription;
widgetTypeChangedSubscription: Subscription;
@@ -120,7 +119,6 @@ export class DataExplorerDashboardWidgetComponent implements OnInit, OnDestroy {
ngOnInit(): void {
this.authSubscription = this.authService.user$.subscribe(user => {
this.hasDataExplorerWritePrivileges = this.authService.hasRole(UserPrivilege.PRIVILEGE_WRITE_DATA_EXPLORER_VIEW);
- this.hasDataExplorerDeletePrivileges = this.authService.hasRole(UserPrivilege.PRIVILEGE_DELETE_DATA_EXPLORER_VIEW);
});
this.widgetLoaded = true;
this.title = this.dataLakeMeasure.measureName;