From a1ffa4c28d61ede5611165a9ff7f23605b8786c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Sun, 1 Jul 2018 15:49:16 +0200 Subject: [PATCH] Allow TOTP generation in organizations (Fixes #50) --- src/db/models/cipher.rs | 2 +- src/db/models/organization.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index 0d81413..6639f3e 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -97,7 +97,7 @@ impl Cipher { "Favorite": self.favorite, "OrganizationId": self.organization_uuid, "Attachments": attachments_json, - "OrganizationUseTotp": false, + "OrganizationUseTotp": true, "CollectionIds": self.get_collections(user_uuid, &conn), "Name": self.name, diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index a9ac328..9608708 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -66,11 +66,11 @@ impl Organization { "Seats": 10, "MaxCollections": 10, - "Use2fa": false, + "Use2fa": true, "UseDirectory": false, "UseEvents": false, "UseGroups": false, - "UseTotp": false, + "UseTotp": true, "BusinessName": null, "BusinessAddress1": null, @@ -80,8 +80,8 @@ impl Organization { "BusinessTaxNumber": null, "BillingEmail": self.billing_email, - "Plan": "Free", - "PlanType": 0, // Free plan + "Plan": "TeamsAnnually", + "PlanType": 5, // TeamsAnnually plan "Object": "organization", }) @@ -153,11 +153,11 @@ impl UserOrganization { "Seats": 10, "MaxCollections": 10, - "Use2fa": false, + "Use2fa": true, "UseDirectory": false, "UseEvents": false, "UseGroups": false, - "UseTotp": false, + "UseTotp": true, "MaxStorageGb": 10, // The value doesn't matter, we don't check server-side