mirror of
https://github.com/bitwarden/server.git
synced 2024-12-03 14:03:33 +01:00
bringing changes from nc user changes.
This commit is contained in:
parent
68cdc343ea
commit
eb79696dfb
@ -28,8 +28,6 @@ public class VerifyOrganizationDomainCommand(
|
|||||||
ILogger<VerifyOrganizationDomainCommand> logger)
|
ILogger<VerifyOrganizationDomainCommand> logger)
|
||||||
: IVerifyOrganizationDomainCommand
|
: IVerifyOrganizationDomainCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public async Task<OrganizationDomain> UserVerifyOrganizationDomainAsync(OrganizationDomain organizationDomain)
|
public async Task<OrganizationDomain> UserVerifyOrganizationDomainAsync(OrganizationDomain organizationDomain)
|
||||||
{
|
{
|
||||||
if (currentContext.UserId is null)
|
if (currentContext.UserId is null)
|
||||||
@ -53,7 +51,7 @@ public class VerifyOrganizationDomainCommand(
|
|||||||
return domainVerificationResult;
|
return domainVerificationResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<OrganizationDomain> SystemVerifyOrganizationDomainAsync(OrganizationDomain organizationDomain) // need request object to hold who is doing the action
|
public async Task<OrganizationDomain> SystemVerifyOrganizationDomainAsync(OrganizationDomain organizationDomain)
|
||||||
{
|
{
|
||||||
var actingUser = new SystemUser(EventSystemUser.DomainVerification);
|
var actingUser = new SystemUser(EventSystemUser.DomainVerification);
|
||||||
|
|
||||||
@ -128,10 +126,8 @@ public class VerifyOrganizationDomainCommand(
|
|||||||
{
|
{
|
||||||
if (featureService.IsEnabled(FeatureFlagKeys.AccountDeprovisioning))
|
if (featureService.IsEnabled(FeatureFlagKeys.AccountDeprovisioning))
|
||||||
{
|
{
|
||||||
await policyService.SaveAsync(
|
await EnableSingleOrganizationPolicyAsync(organizationId, actingUser);
|
||||||
new Policy { OrganizationId = organizationId, Type = PolicyType.SingleOrg, Enabled = true },
|
await SendVerifiedDomainUserEmailAsync(organizationId);
|
||||||
savingUserId: actingUser is StandardUser standardUser ? standardUser.UserId : null,
|
|
||||||
eventSystemUser: actingUser is SystemUser systemUser ? systemUser.SystemUserType : null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user