1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00

null checked all the permissions (#1227)

This commit is contained in:
Addison Beck
2021-01-19 17:45:12 -05:00
committed by GitHub
parent 6e9238329c
commit c4823f1c37
3 changed files with 5 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ namespace Bit.Core.Models.Data
Seats = response.Seats; Seats = response.Seats;
MaxCollections = response.MaxCollections; MaxCollections = response.MaxCollections;
MaxStorageGb = response.MaxStorageGb; MaxStorageGb = response.MaxStorageGb;
Permissions = response.Permissions; Permissions = response.Permissions ?? new Permissions();
} }
public string Id { get; set; } public string Id { get; set; }
@@ -46,6 +46,6 @@ namespace Bit.Core.Models.Data
public int Seats { get; set; } public int Seats { get; set; }
public int MaxCollections { get; set; } public int MaxCollections { get; set; }
public short? MaxStorageGb { get; set; } public short? MaxStorageGb { get; set; }
public Permissions Permissions { get; set; } public Permissions Permissions { get; set; } = new Permissions();
} }
} }

View File

@@ -26,7 +26,7 @@ namespace Bit.Core.Models.Domain
Seats = obj.Seats; Seats = obj.Seats;
MaxCollections = obj.MaxCollections; MaxCollections = obj.MaxCollections;
MaxStorageGb = obj.MaxStorageGb; MaxStorageGb = obj.MaxStorageGb;
Permissions = obj.Permissions; Permissions = obj.Permissions ?? new Permissions();
} }
public string Id { get; set; } public string Id { get; set; }
@@ -46,7 +46,7 @@ namespace Bit.Core.Models.Domain
public int Seats { get; set; } public int Seats { get; set; }
public int MaxCollections { get; set; } public int MaxCollections { get; set; }
public short? MaxStorageGb { get; set; } public short? MaxStorageGb { get; set; }
public Permissions Permissions { get; set; } public Permissions Permissions { get; set; } = new Permissions();
public bool CanAccess public bool CanAccess
{ {

View File

@@ -23,6 +23,6 @@ namespace Bit.Core.Models.Response
public OrganizationUserStatusType Status { get; set; } public OrganizationUserStatusType Status { get; set; }
public OrganizationUserType Type { get; set; } public OrganizationUserType Type { get; set; }
public bool Enabled { get; set; } public bool Enabled { get; set; }
public Permissions Permissions { get; set; } public Permissions Permissions { get; set; } = new Permissions();
} }
} }