Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null checked all the permissions #1227

Merged
merged 1 commit into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
}