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

[PM-6201] Self-Host Admin Portal is reporting "10239 GB of Additional… (#5130)

This commit is contained in:
Jonas Hendrickx
2024-12-11 10:32:28 +01:00
committed by GitHub
parent 94761a8c7b
commit 674e522843
2 changed files with 7 additions and 10 deletions

View File

@ -181,6 +181,11 @@ public class Organization : ITableObject<Guid>, IStorableSubscriber, IRevisable,
public bool IsExpired() => ExpirationDate.HasValue && ExpirationDate.Value <= DateTime.UtcNow;
/// <summary>
/// Used storage in gigabytes.
/// </summary>
public double StorageGb => Storage.HasValue ? Math.Round(Storage.Value / 1073741824D, 2) : 0;
public long StorageBytesRemaining()
{
if (!MaxStorageGb.HasValue)