mirror of
https://github.com/bitwarden/server
synced 2025-12-30 07:03:42 +00:00
[EC-826] Merge license sync feature branch to master (#2587)
* [EC-634] Extract GenerateLicenseAsync to a query (#2373) * [EC-637] Add license sync to server (#2453) * [EC-1036] Show correct license sync date (#2626) * Update method name per new pattern
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
namespace Bit.Core.Models.OrganizationConnectionConfigs;
|
||||
|
||||
public class BillingSyncConfig
|
||||
public class BillingSyncConfig : IConnectionConfig
|
||||
{
|
||||
public string BillingSyncKey { get; set; }
|
||||
public Guid CloudOrganizationId { get; set; }
|
||||
public DateTime? LastLicenseSync { get; set; }
|
||||
|
||||
public bool Validate(out string exception)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(BillingSyncKey))
|
||||
{
|
||||
exception = "Failed to get Billing Sync Key";
|
||||
return false;
|
||||
}
|
||||
|
||||
exception = "";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Bit.Core.Models.OrganizationConnectionConfigs;
|
||||
|
||||
public interface IConnectionConfig
|
||||
{
|
||||
bool Validate(out string exception);
|
||||
}
|
||||
@@ -3,9 +3,21 @@ using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Core.Models.OrganizationConnectionConfigs;
|
||||
|
||||
public class ScimConfig
|
||||
public class ScimConfig : IConnectionConfig
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public ScimProviderType? ScimProvider { get; set; }
|
||||
|
||||
public bool Validate(out string exception)
|
||||
{
|
||||
if (!Enabled)
|
||||
{
|
||||
exception = "Scim Config is disabled";
|
||||
return false;
|
||||
}
|
||||
|
||||
exception = "";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user