From b39bbd5316da37f947824ce7f71eb38451b496ce Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Fri, 19 Jun 2026 11:22:05 +0200 Subject: [PATCH] PromptIsPublic wird gespeichert --- BeWo/View/Detail/AI/AiPromptbausteinFolderView.xaml | 6 +++--- BeWo/View/Detail/AI/AiPromptbausteinPromptView.xaml | 6 +++--- BeWo/ViewModel/AiPromptbausteinPromptVM.cs | 7 +++++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/BeWo/View/Detail/AI/AiPromptbausteinFolderView.xaml b/BeWo/View/Detail/AI/AiPromptbausteinFolderView.xaml index f803b8d93..bbb0efecc 100644 --- a/BeWo/View/Detail/AI/AiPromptbausteinFolderView.xaml +++ b/BeWo/View/Detail/AI/AiPromptbausteinFolderView.xaml @@ -46,7 +46,7 @@ @@ -99,13 +99,13 @@ IsEnabled="False" SelectedCompactEmployeeDC="{Binding ViewModel.Creator}" /> - + IsEnabled="{Binding ViewModel.CanShareEdit}" /> ShowPrompt && ShowPromptByTenant; } + public bool CanShareEdit + { + get => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModulePromptbausteinShare) + && Creator?.EmployeeOid is long owner + && owner == BeWoApp.CompactLoggedOnEmployee.EmployeeOid; + } + public string FavoritenHeader => IsFavorite ? "Favorit entfernen" : "Favorit hinzufügen"; protected override void InitByDataContract(AiPromptbausteinPromptDC pDataContract)