mirror of
https://github.com/bitwarden/server.git
synced 2025-05-28 23:04:50 -05:00
gateway check
This commit is contained in:
parent
ed86a5f9d5
commit
62732fa002
@ -722,7 +722,7 @@ namespace Bit.Core.Services
|
|||||||
public async Task EnableAsync(Guid organizationId, DateTime? expirationDate)
|
public async Task EnableAsync(Guid organizationId, DateTime? expirationDate)
|
||||||
{
|
{
|
||||||
var org = await GetOrgById(organizationId);
|
var org = await GetOrgById(organizationId);
|
||||||
if(org != null && !org.Enabled)
|
if(org != null && !org.Enabled && org.Gateway.HasValue)
|
||||||
{
|
{
|
||||||
org.Enabled = true;
|
org.Enabled = true;
|
||||||
org.ExpirationDate = expirationDate;
|
org.ExpirationDate = expirationDate;
|
||||||
|
@ -830,7 +830,7 @@ namespace Bit.Core.Services
|
|||||||
|
|
||||||
public async Task EnablePremiumAsync(User user, DateTime? expirationDate)
|
public async Task EnablePremiumAsync(User user, DateTime? expirationDate)
|
||||||
{
|
{
|
||||||
if(user != null && !user.Premium)
|
if(user != null && !user.Premium && user.Gateway.HasValue)
|
||||||
{
|
{
|
||||||
user.Premium = true;
|
user.Premium = true;
|
||||||
user.PremiumExpirationDate = expirationDate;
|
user.PremiumExpirationDate = expirationDate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user