1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 13:08:17 -05:00

Always enable events for providers (#1487)

This commit is contained in:
Matt Gibson 2021-07-27 15:44:54 -05:00 committed by GitHub
parent 545d5f942b
commit 71daef2588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 8 deletions

View File

@ -59,6 +59,7 @@ namespace Bit.CommCore.Services
{
Status = ProviderStatusType.Pending,
Enabled = true,
UseEvents = true,
};
await _providerRepository.CreateAsync(provider);

View File

@ -18,7 +18,6 @@ namespace Bit.Admin.Models
BusinessName = provider.BusinessName;
BillingEmail = provider.BillingEmail;
Enabled = provider.Enabled;
UseEvents = provider.UseEvents;
}
public bool Enabled { get; set; }
@ -26,14 +25,12 @@ namespace Bit.Admin.Models
public string BusinessName { get; set; }
public string Name { get; set; }
[Display(Name = "Events")]
public bool UseEvents { get; set; }
public Provider ToProvider(Provider existingProvider)
{
existingProvider.Name = Name;
existingProvider.BusinessName = BusinessName;
existingProvider.BillingEmail = BillingEmail?.ToLowerInvariant()?.Trim();
existingProvider.UseEvents = UseEvents;
existingProvider.Enabled = Enabled;
return existingProvider;
}

View File

@ -39,11 +39,6 @@
</div>
</div>
</div>
<h2>Features</h2>
<div class="form-check">
<input type="checkbox" class="form-check-input" asp-for="UseEvents">
<label class="form-check-label" asp-for="UseEvents"></label>
</div>
</form>
<div class="d-flex mt-4">
<button type="submit" class="btn btn-primary" form="edit-form">Save</button>