mirror of
https://github.com/bitwarden/mobile
synced 2025-12-18 09:13:15 +00:00
Hide email address in Sends (#1340)
* Add HideEmail model properties and locale strings * Fix UI strings * Add HideEmail to SendService * Add HideEmail option to UI * Tidy up declarations * Add Bitwarden Send translation warning
This commit is contained in:
@@ -311,6 +311,26 @@ namespace Bit.App.Utilities
|
||||
});
|
||||
}
|
||||
|
||||
public static async Task<bool> IsHideEmailDisabledByPolicyAsync()
|
||||
{
|
||||
var policyService = ServiceContainer.Resolve<IPolicyService>("policyService");
|
||||
var userService = ServiceContainer.Resolve<IUserService>("userService");
|
||||
|
||||
var policies = await policyService.GetAll(PolicyType.SendOptions);
|
||||
var organizations = await userService.GetAllOrganizationAsync();
|
||||
return organizations.Any(o =>
|
||||
{
|
||||
return o.Enabled &&
|
||||
o.Status == OrganizationUserStatusType.Confirmed &&
|
||||
o.UsePolicies &&
|
||||
!o.canManagePolicies &&
|
||||
policies.Any(p => p.OrganizationId == o.Id &&
|
||||
p.Enabled &&
|
||||
p.Data.ContainsKey("disableHideEmail") &&
|
||||
(bool)p.Data["disableHideEmail"]);
|
||||
});
|
||||
}
|
||||
|
||||
public static async Task<bool> PerformUpdateTasksAsync(ISyncService syncService,
|
||||
IDeviceActionService deviceActionService, IStorageService storageService)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user