From fcd63a66e00921a84c70b9f99a6de0c07c50b013 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 16 Aug 2017 15:52:40 -0400 Subject: [PATCH] self hosted org users get premium access --- src/Core/Services/Implementations/OrganizationService.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/Services/Implementations/OrganizationService.cs index 9c482dfa3..6682c7d2f 100644 --- a/src/Core/Services/Implementations/OrganizationService.cs +++ b/src/Core/Services/Implementations/OrganizationService.cs @@ -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());