1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-07 05:58:13 -05:00

storageBytesRemaining by way of users get premium

This commit is contained in:
Kyle Spearrin 2018-08-29 09:08:05 -04:00
parent db3316dd60
commit 0983a35cf3

View File

@ -133,7 +133,16 @@ namespace Bit.Core.Services
throw new BadRequestException("You must have premium status to use attachments."); throw new BadRequestException("You must have premium status to use attachments.");
} }
storageBytesRemaining = user.StorageBytesRemaining(); if(user.Premium)
{
storageBytesRemaining = user.StorageBytesRemaining();
}
else
{
// Users that get access to file storage/premium from their organization get the default
// 1 GB max storage.
storageBytesRemaining = user.StorageBytesRemaining(1);
}
} }
else if(cipher.OrganizationId.HasValue) else if(cipher.OrganizationId.HasValue)
{ {