1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-28 23:04:50 -05:00

gateway check

This commit is contained in:
Kyle Spearrin 2019-09-02 08:53:59 -04:00
parent ed86a5f9d5
commit 62732fa002
2 changed files with 2 additions and 2 deletions

View File

@ -722,7 +722,7 @@ namespace Bit.Core.Services
public async Task EnableAsync(Guid organizationId, DateTime? expirationDate)
{
var org = await GetOrgById(organizationId);
if(org != null && !org.Enabled)
if(org != null && !org.Enabled && org.Gateway.HasValue)
{
org.Enabled = true;
org.ExpirationDate = expirationDate;

View File

@ -830,7 +830,7 @@ namespace Bit.Core.Services
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.PremiumExpirationDate = expirationDate;