Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
add missing permissions to organization objs
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Jul 10, 2018
1 parent 049e129 commit 36ab2ec
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/models/data/organizationData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,30 @@ export class OrganizationData {
status: OrganizationUserStatusType;
type: OrganizationUserType;
enabled: boolean;
useGroups: boolean;
useDirectory: boolean;
useEvents: boolean;
useTotp: boolean;
use2fa: boolean;
selfHost: boolean;
usersGetPremium: boolean;
seats: number;
maxCollections: number;

constructor(response: ProfileOrganizationResponse) {
this.id = response.id;
this.name = response.name;
this.status = response.status;
this.type = response.type;
this.enabled = response.enabled;
this.useGroups = response.useGroups;
this.useDirectory = response.useDirectory;
this.useEvents = response.useEvents;
this.useTotp = response.useTotp;
this.use2fa = response.use2fa;
this.selfHost = response.selfHost;
this.usersGetPremium = response.usersGetPremium;
this.seats = response.seats;
this.maxCollections = response.maxCollections;
}
}
18 changes: 18 additions & 0 deletions src/models/domain/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ export class Organization {
status: OrganizationUserStatusType;
type: OrganizationUserType;
enabled: boolean;
useGroups: boolean;
useDirectory: boolean;
useEvents: boolean;
useTotp: boolean;
use2fa: boolean;
selfHost: boolean;
usersGetPremium: boolean;
seats: number;
maxCollections: number;

constructor(obj?: OrganizationData) {
if (obj == null) {
Expand All @@ -20,6 +29,15 @@ export class Organization {
this.status = obj.status;
this.type = obj.type;
this.enabled = obj.enabled;
this.useGroups = obj.useGroups;
this.useDirectory = obj.useDirectory;
this.useEvents = obj.useEvents;
this.useTotp = obj.useTotp;
this.use2fa = obj.use2fa;
this.selfHost = obj.selfHost;
this.usersGetPremium = obj.usersGetPremium;
this.seats = obj.seats;
this.maxCollections = obj.maxCollections;
}

get canAccess() {
Expand Down
4 changes: 4 additions & 0 deletions src/models/response/profileOrganizationResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export class ProfileOrganizationResponse {
useEvents: boolean;
useTotp: boolean;
use2fa: boolean;
selfHost: boolean;
usersGetPremium: boolean;
seats: number;
maxCollections: number;
maxStorageGb?: number;
Expand All @@ -25,6 +27,8 @@ export class ProfileOrganizationResponse {
this.useEvents = response.UseEvents;
this.useTotp = response.UseTotp;
this.use2fa = response.Use2fa;
this.selfHost = response.SelfHost;
this.usersGetPremium = response.UsersGetPremium;
this.seats = response.Seats;
this.maxCollections = response.MaxCollections;
this.maxStorageGb = response.MaxStorageGb;
Expand Down

0 comments on commit 36ab2ec

Please sign in to comment.