mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
self hosted users get 1 TB
This commit is contained in:
@ -25,6 +25,7 @@ namespace Bit.Core.Services
|
|||||||
private readonly IAttachmentStorageService _attachmentStorageService;
|
private readonly IAttachmentStorageService _attachmentStorageService;
|
||||||
private readonly IEventService _eventService;
|
private readonly IEventService _eventService;
|
||||||
private readonly IUserService _userService;
|
private readonly IUserService _userService;
|
||||||
|
private readonly GlobalSettings _globalSettings;
|
||||||
|
|
||||||
public CipherService(
|
public CipherService(
|
||||||
ICipherRepository cipherRepository,
|
ICipherRepository cipherRepository,
|
||||||
@ -37,7 +38,8 @@ namespace Bit.Core.Services
|
|||||||
IPushNotificationService pushService,
|
IPushNotificationService pushService,
|
||||||
IAttachmentStorageService attachmentStorageService,
|
IAttachmentStorageService attachmentStorageService,
|
||||||
IEventService eventService,
|
IEventService eventService,
|
||||||
IUserService userService)
|
IUserService userService,
|
||||||
|
GlobalSettings globalSettings)
|
||||||
{
|
{
|
||||||
_cipherRepository = cipherRepository;
|
_cipherRepository = cipherRepository;
|
||||||
_folderRepository = folderRepository;
|
_folderRepository = folderRepository;
|
||||||
@ -50,6 +52,7 @@ namespace Bit.Core.Services
|
|||||||
_attachmentStorageService = attachmentStorageService;
|
_attachmentStorageService = attachmentStorageService;
|
||||||
_eventService = eventService;
|
_eventService = eventService;
|
||||||
_userService = userService;
|
_userService = userService;
|
||||||
|
_globalSettings = globalSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task SaveAsync(Cipher cipher, Guid savingUserId, bool orgAdmin = false)
|
public async Task SaveAsync(Cipher cipher, Guid savingUserId, bool orgAdmin = false)
|
||||||
@ -141,7 +144,8 @@ namespace Bit.Core.Services
|
|||||||
{
|
{
|
||||||
// Users that get access to file storage/premium from their organization get the default
|
// Users that get access to file storage/premium from their organization get the default
|
||||||
// 1 GB max storage.
|
// 1 GB max storage.
|
||||||
storageBytesRemaining = user.StorageBytesRemaining(1);
|
storageBytesRemaining = user.StorageBytesRemaining(
|
||||||
|
_globalSettings.SelfHosted ? (short)1024 : (short)1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(cipher.OrganizationId.HasValue)
|
else if(cipher.OrganizationId.HasValue)
|
||||||
|
Reference in New Issue
Block a user