Browse Source
Merge pull request #2594 from Budibase/fix/2593
Fixing issue with multi-tenancy (upgrade from single tenancy)
gh-pages
Michael Drury
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
packages/auth/src/db/utils.js
|
|
|
@ -67,6 +67,9 @@ function getDocParams(docType, docId = null, otherProps = {}) { |
|
|
|
* @return {null|string} The tenant ID found within the app ID. |
|
|
|
*/ |
|
|
|
exports.getTenantIDFromAppID = appId => { |
|
|
|
if (!appId) { |
|
|
|
return null |
|
|
|
} |
|
|
|
const split = appId.split(SEPARATOR) |
|
|
|
const hasDev = split[1] === DocumentTypes.DEV |
|
|
|
if ((hasDev && split.length === 3) || (!hasDev && split.length === 2)) { |
|
|
|
|