diff --git a/src/App/Pages/Vault/ViewPage.xaml.cs b/src/App/Pages/Vault/ViewPage.xaml.cs index b83f32d4..46b2969c 100644 --- a/src/App/Pages/Vault/ViewPage.xaml.cs +++ b/src/App/Pages/Vault/ViewPage.xaml.cs @@ -378,6 +378,15 @@ private void AdjustToolbar() { ToolbarItems.Insert(1, _editItem); } + // Cozy customization, Prevent to restore/edit/clone/move Profiles as they will be replaced by Cozy Contacts + //* + if (_vm.Cipher.Type == Core.Enums.CipherType.Identity) + { + ToolbarItems.Remove(_editItem); + ToolbarItems.Remove(_cloneItem); + ToolbarItems.Remove(_shareItem); + } + //*/ } } } diff --git a/src/App/Pages/Vault/ViewPageViewModel.cs b/src/App/Pages/Vault/ViewPageViewModel.cs index d627b8d5..806a2908 100644 --- a/src/App/Pages/Vault/ViewPageViewModel.cs +++ b/src/App/Pages/Vault/ViewPageViewModel.cs @@ -238,7 +238,7 @@ public bool TotpLow } } public bool IsDeleted => Cipher.IsDeleted; - public bool CanEdit => !Cipher.IsDeleted; + public bool CanEdit => !Cipher.IsDeleted && Cipher.Type != CipherType.Identity; // Cozy customization, display folder (Cozy concept) //* diff --git a/src/App/Utilities/AppHelpers.cs b/src/App/Utilities/AppHelpers.cs index 13d78bc8..2b4e7418 100644 --- a/src/App/Utilities/AppHelpers.cs +++ b/src/App/Utilities/AppHelpers.cs @@ -30,7 +30,13 @@ public static async Task CipherListOptions(ContentPage page, CipherView var clipboardService = ServiceContainer.Resolve("clipboardService"); var options = new List { AppResources.View }; + + // Cozy customization, Prevent to edit Profiles as they will be replaced by Cozy Contacts + /* if (!cipher.IsDeleted) + /*/ + if (!cipher.IsDeleted && cipher.Type != CipherType.Identity) + //*/ { options.Add(AppResources.Edit); }