1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-22 11:35:21 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ namespace Bit.Core.Models.Data
Seats = response.Seats;
MaxCollections = response.MaxCollections;
MaxStorageGb = response.MaxStorageGb;
Permissions = response.Permissions;
Permissions = response.Permissions ?? new Permissions();
}
public string Id { get; set; }
@ -46,6 +46,6 @@ namespace Bit.Core.Models.Data
public int Seats { get; set; }
public int MaxCollections { 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;
MaxCollections = obj.MaxCollections;
MaxStorageGb = obj.MaxStorageGb;
Permissions = obj.Permissions;
Permissions = obj.Permissions ?? new Permissions();
}
public string Id { get; set; }
@ -46,7 +46,7 @@ namespace Bit.Core.Models.Domain
public int Seats { get; set; }
public int MaxCollections { get; set; }
public short? MaxStorageGb { get; set; }
public Permissions Permissions { get; set; }
public Permissions Permissions { get; set; } = new Permissions();
public bool CanAccess
{

View File

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