diff --git a/BeWo/ViewModel/ListViewModel/AiConversationListVM.cs b/BeWo/ViewModel/ListViewModel/AiConversationListVM.cs index 6db5db33f..a8c99a760 100644 --- a/BeWo/ViewModel/ListViewModel/AiConversationListVM.cs +++ b/BeWo/ViewModel/ListViewModel/AiConversationListVM.cs @@ -55,7 +55,7 @@ namespace BeWo.ViewModel.ListViewModel ReloadModelsCommand = new DelegateCommand(ReloadModels); OpenSettingCommand = new DelegateCommand(OpenSetting, () => BeWoApp.AppSettings.ModuleAiSettingsEnabled && BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleViewSetting)); - OpenCloneCommand = new DelegateCommand(OpenClone, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatAdd) && SelectedVM is object); + OpenCloneCommand = new DelegateCommand(OpenClone, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatClone) && SelectedVM is object); CloneCommand = new DelegateCommand(Clone); AskDeleteCommand = new DelegateCommand(AskDelete, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatDelete) && SelectedVM is object); diff --git a/BeWo/ViewModel/UserGroupVM.cs b/BeWo/ViewModel/UserGroupVM.cs index e72839866..28e9f9862 100644 --- a/BeWo/ViewModel/UserGroupVM.cs +++ b/BeWo/ViewModel/UserGroupVM.cs @@ -291,7 +291,7 @@ namespace BeWo.ViewModel return false; } private static bool IsAiModuleRight(UserRightType right) => - ContainsRight(right, UserRightType.AiModuleView, UserRightType.AiModuleView2, UserRightType.AiModuleChatAdd, UserRightType.AiModuleChatDelete, UserRightType.AiModuleChatEdit, UserRightType.AiModuleViewSetting); + ContainsRight(right, UserRightType.AiModuleView, UserRightType.AiModuleView2, UserRightType.AiModuleChatAdd, UserRightType.AiModuleChatDelete, UserRightType.AiModuleChatEdit, UserRightType.AiModuleViewSetting, UserRightType.AiModuleChatClone); private static bool ContainsRight(UserRightType right, params UserRightType[] rightTypes) { diff --git a/Data/Security/UserRightHelper.cs b/Data/Security/UserRightHelper.cs index a580e1e7b..b26f37e0d 100644 --- a/Data/Security/UserRightHelper.cs +++ b/Data/Security/UserRightHelper.cs @@ -205,6 +205,7 @@ namespace BeWo.Data.Security || r == UserRightType.AiModuleChatAdd || r == UserRightType.AiModuleChatDelete || r == UserRightType.AiModuleChatEdit + || r == UserRightType.AiModuleChatClone || r == UserRightType.AiModuleViewSetting; } } diff --git a/Service/ServiceContracts/IAiEnhancedService.cs b/Service/ServiceContracts/IAiEnhancedService.cs index 389c4bdf9..e48782fad 100644 --- a/Service/ServiceContracts/IAiEnhancedService.cs +++ b/Service/ServiceContracts/IAiEnhancedService.cs @@ -42,7 +42,7 @@ namespace BeWo.Service.ServiceContracts [FaultContract(typeof(BeWoFault))] [OperationContract] - [RequirePermission(UserRightType.AiModuleChatAdd)] + [RequirePermission(UserRightType.AiModuleChatClone)] AiConversationDC CloneAiConversation(long conversation_oid, long? message_oid); [FaultContract(typeof(BeWoFault))] diff --git a/Shared/BeWoEntityEnums.cs b/Shared/BeWoEntityEnums.cs index 2f321c99b..0fa4647f7 100644 --- a/Shared/BeWoEntityEnums.cs +++ b/Shared/BeWoEntityEnums.cs @@ -632,6 +632,7 @@ namespace BS.Shared AiModuleChatDelete = 201003, AiModuleView2 = 201004, AiModuleViewSetting = 201005, + AiModuleChatClone = 201006, } public enum PersonType diff --git a/Shared/Core/EnumTranslations.cs b/Shared/Core/EnumTranslations.cs index 04e8c12e4..67f1c01b7 100644 --- a/Shared/Core/EnumTranslations.cs +++ b/Shared/Core/EnumTranslations.cs @@ -639,7 +639,7 @@ namespace BS.Shared.Core { var dict = new Dictionary(); - var action_keywords = new string[] { "ansehen", "verwalten", "anlegen", "bearbeiten", "löschen", "senden" }; + var action_keywords = new string[] { "ansehen", "verwalten", "anlegen", "bearbeiten", "löschen", "senden", "klonen" }; dict.Add(UserRightType.CreateAll, Translator.Translate("Alles anlegen")); @@ -718,6 +718,7 @@ namespace BS.Shared.Core dict.Add(UserRightType.AiModuleView, Translator.Translate($"Module AI {action_keywords[0]}")); dict.Add(UserRightType.AiModuleView2, Translator.Translate($"Module AI 2 {action_keywords[0]}")); dict.Add(UserRightType.AiModuleChatAdd, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[2]}")); + dict.Add(UserRightType.AiModuleChatClone, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[6]}")); dict.Add(UserRightType.AiModuleChatEdit, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[3]}")); dict.Add(UserRightType.AiModuleChatDelete, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[4]}")); dict.Add(UserRightType.AiModuleViewSetting, Translator.Translate($"Module AI-> Einstellungen {action_keywords[0]}"));