1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-26 17:37:36 +01:00

self hosted org users get premium access

This commit is contained in:
Kyle Spearrin 2017-08-16 15:52:40 -04:00
parent 582728a083
commit fcd63a66e0

View File

@ -944,6 +944,14 @@ namespace Bit.Core.Services
await _mailService.SendOrganizationConfirmedEmailAsync(org.Name, user.Email);
}
// self-hosted org users get premium access
if(_globalSettings.SelfHosted && !user.Premium && org.Enabled)
{
user.Premium = true;
user.MaxStorageGb = 10240; // 10 TB
await _userRepository.ReplaceAsync(user);
}
// push
var deviceIds = await GetUserDeviceIdsAsync(orgUser.UserId.Value);
await _pushRegistrationService.AddUserRegistrationOrganizationAsync(deviceIds, organizationId.ToString());