Rechte entfernt:

- AiModuleChatClone
- AiModuleViewSetting
- AiModulePromptbausteinSeeAll
This commit is contained in:
2026-03-04 11:23:23 +01:00
parent a5b5e6b00f
commit 9cf57a2885
6 changed files with 15 additions and 15 deletions

View File

@@ -288,9 +288,9 @@ namespace BeWo.ViewModel
return false;
}
private static bool IsAiModuleRight(UserRightType right) =>
ContainsRight(right, UserRightType.AiModuleView, UserRightType.AiModuleChatAdd, UserRightType.AiModuleChatDelete, UserRightType.AiModuleChatEdit, UserRightType.AiModuleChatClone);
ContainsRight(right, UserRightType.AiModuleView, UserRightType.AiModuleChatAdd, UserRightType.AiModuleChatDelete, UserRightType.AiModuleChatEdit);
private static bool IsAiModuleSettingRight(UserRightType right) =>
ContainsRight(right, UserRightType.AiModuleViewSetting);
ContainsRight(right);
private static bool ContainsRight(UserRightType right, params UserRightType[] rightTypes)
{

View File

@@ -40,9 +40,9 @@ namespace BeWo.ViewModel.View.AI
ReloadConversationsCommand = new DelegateCommand(ReloadConversations);
ReloadModelsCommand = new DelegateCommand(ReloadModels);
OpenSettingCommand = new DelegateCommand(OpenSetting, () => (BeWoApp.AppSettings?.ModuleAiSettingsEnabled ?? true) && BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleViewSetting));
OpenSettingCommand = new DelegateCommand(OpenSetting, () => BeWoApp.AppSettings?.ModuleAiSettingsEnabled ?? false);
RenameCommand = new DelegateCommand(Rename, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatEdit) && ListVM.SelectedVM is object);
OpenCloneCommand = new DelegateCommand(OpenClone, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatClone) && ListVM.SelectedVM is object && BeWoAppInfo.IsInAiDeveloperMode);
OpenCloneCommand = new DelegateCommand(OpenClone, () => ListVM.SelectedVM is object && BeWoAppInfo.IsInAiDeveloperMode);
CloneCommand = new DelegateCommand(Clone);
AskDeleteCommand = new DelegateCommand(AskDelete, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleChatDelete) && ListVM.SelectedVM is object);

View File

@@ -229,15 +229,15 @@ namespace BeWo.Data.Security
{
return r == UserRightType.KalenderInAbwesenheitenUebernehmen
|| r == UserRightType.AiModuleView
|| r == UserRightType.AiModuleChatClone
|| r == UserRightType.AiModuleViewSetting
//|| r == UserRightType.AiModuleChatClone
//|| r == UserRightType.AiModuleViewSetting
|| r == UserRightType.AiModuleChatAdd
|| r == UserRightType.AiModuleChatDelete
|| r == UserRightType.AiModuleChatEdit
|| r == UserRightType.AiModulePromptbausteineAdd
|| r == UserRightType.AiModulePromptbausteineEdit
|| r == UserRightType.AiModulePromptbausteineRemove
|| r == UserRightType.AiModulePromptbausteineSeeAll
//|| r == UserRightType.AiModulePromptbausteineSeeAll
|| r == UserRightType.AiModulePromptbausteineView
//|| r == UserRightType.AiModulePromptbausteineExecute
|| r == UserRightType.AiVoiceView;

View File

@@ -23,7 +23,7 @@ namespace BeWo.Service.ServiceContracts.Enhanced
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequireWcfAuthorization(UserRightType.AiModuleViewSetting)]
//[RequireWcfAuthorization(UserRightType.AiModuleViewSetting)]
AiConfigDC UpdateAiConfig(AiConfigDC toUpdate);
[FaultContract(typeof(BeWoFault))]
@@ -48,7 +48,7 @@ namespace BeWo.Service.ServiceContracts.Enhanced
[FaultContract(typeof(BeWoFault))]
[OperationContract]
[RequireWcfAuthorization(UserRightType.AiModuleChatClone)]
//[RequireWcfAuthorization(UserRightType.AiModuleChatClone)]
AiConversationDC CloneAiConversation(long conversation_oid, long? message_oid);
[FaultContract(typeof(BeWoFault))]

View File

@@ -644,14 +644,14 @@ namespace BS.Shared
AiModuleChatAdd = 201001,
AiModuleChatEdit = 201002,
AiModuleChatDelete = 201003,
AiModuleViewSetting = 201005,
AiModuleChatClone = 201006,
//AiModuleViewSetting = 201005,
//AiModuleChatClone = 201006,
AiModulePromptbausteineView = 201007,
AiModulePromptbausteineAdd = 201008,
AiModulePromptbausteineEdit = 201009,
AiModulePromptbausteineRemove = 201010,
AiModulePromptbausteineSeeAll = 201011,
//AiModulePromptbausteineSeeAll = 201011,
//AiModulePromptbausteineExecute = 201012,
AiVoiceView= 201020,
}

View File

@@ -769,16 +769,16 @@ namespace BS.Shared.Core
dict.Add(UserRightType.AiModuleView, Translator.Translate($"KI-Chat verwenden {action_keywords[0]}"));
dict.Add(UserRightType.AiModuleChatAdd, Translator.Translate($"KI-Konversationen/Nachrichten {action_keywords[2]}"));
dict.Add(UserRightType.AiModuleChatClone, Translator.Translate($"KI-Konversationen/Nachrichten {action_keywords[6]}"));
//dict.Add(UserRightType.AiModuleChatClone, Translator.Translate($"KI-Konversationen/Nachrichten {action_keywords[6]}"));
dict.Add(UserRightType.AiModuleChatEdit, Translator.Translate($"KI-Konversationen/Nachrichten {action_keywords[3]}"));
dict.Add(UserRightType.AiModuleChatDelete, Translator.Translate($"KI-Konversationen/Nachrichten {action_keywords[4]}"));
dict.Add(UserRightType.AiModuleViewSetting, Translator.Translate($"KI-Einstellungen {action_keywords[0]}"));
//dict.Add(UserRightType.AiModuleViewSetting, Translator.Translate($"KI-Einstellungen {action_keywords[0]}"));
dict.Add(UserRightType.AiModulePromptbausteineView, Translator.Translate($"KI-Promptbausteine {action_keywords[0]}"));
dict.Add(UserRightType.AiModulePromptbausteineAdd, Translator.Translate($"KI-Promptbaustein {action_keywords[2]}"));
dict.Add(UserRightType.AiModulePromptbausteineEdit, Translator.Translate($"KI-Promptbaustein {action_keywords[3]}"));
dict.Add(UserRightType.AiModulePromptbausteineRemove, Translator.Translate($"KI-Promptbaustein {action_keywords[4]}"));
dict.Add(UserRightType.AiModulePromptbausteineSeeAll, Translator.Translate($"KI-Promptbausteine {action_keywords[7]}"));
//dict.Add(UserRightType.AiModulePromptbausteineSeeAll, Translator.Translate($"KI-Promptbausteine {action_keywords[7]}"));
//dict.Add(UserRightType.AiModulePromptbausteineExecute, Translator.Translate($"KI-Promptbausteine {action_keywords[8]}"));
dict.Add(UserRightType.PersonView_Create, Translator.Translate("Personen anlegen"));