From be7d78de4633baa0f7ad50a2f27cc9e18b924e1f Mon Sep 17 00:00:00 2001 From: Ike Kottlowski Date: Wed, 21 Jan 2026 10:09:53 -0500 Subject: [PATCH] chore: enable nullable --- src/Core/Auth/Entities/EmergencyAccess.cs | 9 +++------ .../Auth/Models/Data/EmergencyAccessDetails.cs | 17 +++++++---------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/Core/Auth/Entities/EmergencyAccess.cs b/src/Core/Auth/Entities/EmergencyAccess.cs index 36aaf46a8c..908bd32145 100644 --- a/src/Core/Auth/Entities/EmergencyAccess.cs +++ b/src/Core/Auth/Entities/EmergencyAccess.cs @@ -1,7 +1,4 @@ -// FIXME: Update this file to be null safe and then delete the line below -#nullable disable - -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using Bit.Core.Auth.Enums; using Bit.Core.Entities; using Bit.Core.Utilities; @@ -14,8 +11,8 @@ public class EmergencyAccess : ITableObject public Guid GrantorId { get; set; } public Guid? GranteeId { get; set; } [MaxLength(256)] - public string Email { get; set; } - public string KeyEncrypted { get; set; } + public required string Email { get; set; } + public required string KeyEncrypted { get; set; } public EmergencyAccessType Type { get; set; } public EmergencyAccessStatusType Status { get; set; } public short WaitTimeDays { get; set; } diff --git a/src/Core/Auth/Models/Data/EmergencyAccessDetails.cs b/src/Core/Auth/Models/Data/EmergencyAccessDetails.cs index 03661c7276..47667b38d2 100644 --- a/src/Core/Auth/Models/Data/EmergencyAccessDetails.cs +++ b/src/Core/Auth/Models/Data/EmergencyAccessDetails.cs @@ -1,16 +1,13 @@ -// FIXME: Update this file to be null safe and then delete the line below -#nullable disable - -using Bit.Core.Auth.Entities; +using Bit.Core.Auth.Entities; namespace Bit.Core.Auth.Models.Data; public class EmergencyAccessDetails : EmergencyAccess { - public string GranteeName { get; set; } - public string GranteeEmail { get; set; } - public string GranteeAvatarColor { get; set; } - public string GrantorName { get; set; } - public string GrantorEmail { get; set; } - public string GrantorAvatarColor { get; set; } + public string? GranteeName { get; set; } + public required string GranteeEmail { get; set; } + public string? GranteeAvatarColor { get; set; } + public string? GrantorName { get; set; } + public required string GrantorEmail { get; set; } + public string? GrantorAvatarColor { get; set; } }