1
0
Fork 0
mirror of synced 2024-08-13 17:11:49 +12:00

Fix for CI build failure.

This commit is contained in:
mike12345567 2022-12-06 18:23:55 +00:00
parent b9ce140d95
commit 4300e5c733
2 changed files with 2 additions and 2 deletions

View file

@ -181,7 +181,7 @@ export function generateUserMetadataID(globalId: string) {
/**
* Breaks up the ID to get the global ID.
*/
export function getGlobalIDFromUserMetadataID(id?: string) {
export function getGlobalIDFromUserMetadataID(id: string) {
const prefix = `${DocumentType.ROW}${SEPARATOR}${InternalTable.USER_METADATA}${SEPARATOR}`
if (!id || !id.includes(prefix)) {
return id

View file

@ -11,7 +11,7 @@ import { BBContext, User } from "@budibase/types"
function isLoggedInUser(ctx: BBContext, user: User) {
const loggedInId = ctx.user?._id
const globalUserId = dbCore.getGlobalIDFromUserMetadataID(loggedInId)
const globalUserId = dbCore.getGlobalIDFromUserMetadataID(loggedInId!)
// check both just incase
return globalUserId === user._id || loggedInId === user._id
}