mirror of
https://github.com/bitwarden/server.git
synced 2024-12-02 13:53:23 +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)
|
||||
: IVerifyOrganizationDomainCommand
|
||||
{
|
||||
|
||||
|
||||
public async Task<OrganizationDomain> UserVerifyOrganizationDomainAsync(OrganizationDomain organizationDomain)
|
||||
{
|
||||
if (currentContext.UserId is null)
|
||||
@ -53,7 +51,7 @@ public class VerifyOrganizationDomainCommand(
|
||||
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);
|
||||
|
||||
@ -128,10 +126,8 @@ public class VerifyOrganizationDomainCommand(
|
||||
{
|
||||
if (featureService.IsEnabled(FeatureFlagKeys.AccountDeprovisioning))
|
||||
{
|
||||
await policyService.SaveAsync(
|
||||
new Policy { OrganizationId = organizationId, Type = PolicyType.SingleOrg, Enabled = true },
|
||||
savingUserId: actingUser is StandardUser standardUser ? standardUser.UserId : null,
|
||||
eventSystemUser: actingUser is SystemUser systemUser ? systemUser.SystemUserType : null);
|
||||
await EnableSingleOrganizationPolicyAsync(organizationId, actingUser);
|
||||
await SendVerifiedDomainUserEmailAsync(organizationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user