Skip to content

Commit

Permalink
null checked all the permissions (#1227)
Browse files Browse the repository at this point in the history
  • Loading branch information
Addison Beck authored Jan 19, 2021
1 parent 6e92383 commit c4823f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Core/Models/Data/OrganizationData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public OrganizationData(ProfileOrganizationResponse response)
Seats = response.Seats;
MaxCollections = response.MaxCollections;
MaxStorageGb = response.MaxStorageGb;
Permissions = response.Permissions;
Permissions = response.Permissions ?? new Permissions();
}

public string Id { get; set; }
Expand All @@ -46,6 +46,6 @@ public OrganizationData(ProfileOrganizationResponse response)
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();
}
}
4 changes: 2 additions & 2 deletions src/Core/Models/Domain/Organization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public Organization(OrganizationData obj)
Seats = obj.Seats;
MaxCollections = obj.MaxCollections;
MaxStorageGb = obj.MaxStorageGb;
Permissions = obj.Permissions;
Permissions = obj.Permissions ?? new Permissions();
}

public string Id { get; set; }
Expand All @@ -46,7 +46,7 @@ public Organization(OrganizationData obj)
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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Models/Response/ProfileOrganizationResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public class ProfileOrganizationResponse
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();
}
}

0 comments on commit c4823f1

Please sign in to comment.