Renames
This commit is contained in:
parent
c48952d056
commit
54265816cc
|
@ -216,7 +216,7 @@ export function doInEnvironmentContext(
|
||||||
|
|
||||||
export function doInScimContext(task: any) {
|
export function doInScimContext(task: any) {
|
||||||
const updates: ContextMap = {
|
const updates: ContextMap = {
|
||||||
scimCall: true,
|
isScim: true,
|
||||||
}
|
}
|
||||||
return newContext(updates, task)
|
return newContext(updates, task)
|
||||||
}
|
}
|
||||||
|
@ -278,8 +278,8 @@ export function getDevAppDB(opts?: any): Database {
|
||||||
return getDB(conversions.getDevelopmentAppID(appId), opts)
|
return getDB(conversions.getDevelopmentAppID(appId), opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isScimCall(): boolean {
|
export function isScim(): boolean {
|
||||||
const context = Context.get()
|
const context = Context.get()
|
||||||
const scimCall = context?.scimCall
|
const scimCall = context?.isScim
|
||||||
return !!scimCall
|
return !!scimCall
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,5 +6,5 @@ export type ContextMap = {
|
||||||
appId?: string
|
appId?: string
|
||||||
identity?: IdentityContext
|
identity?: IdentityContext
|
||||||
environmentVariables?: Record<string, string>
|
environmentVariables?: Record<string, string>
|
||||||
scimCall?: boolean
|
isScim?: boolean
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { context } from "../.."
|
||||||
async function created(group: UserGroup, timestamp?: number) {
|
async function created(group: UserGroup, timestamp?: number) {
|
||||||
const properties: GroupCreatedEvent = {
|
const properties: GroupCreatedEvent = {
|
||||||
groupId: group._id as string,
|
groupId: group._id as string,
|
||||||
viaScim: context.isScimCall(),
|
viaScim: context.isScim(),
|
||||||
audited: {
|
audited: {
|
||||||
name: group.name,
|
name: group.name,
|
||||||
},
|
},
|
||||||
|
@ -26,7 +26,7 @@ async function created(group: UserGroup, timestamp?: number) {
|
||||||
async function updated(group: UserGroup) {
|
async function updated(group: UserGroup) {
|
||||||
const properties: GroupUpdatedEvent = {
|
const properties: GroupUpdatedEvent = {
|
||||||
groupId: group._id as string,
|
groupId: group._id as string,
|
||||||
viaScim: context.isScimCall(),
|
viaScim: context.isScim(),
|
||||||
audited: {
|
audited: {
|
||||||
name: group.name,
|
name: group.name,
|
||||||
},
|
},
|
||||||
|
@ -37,7 +37,7 @@ async function updated(group: UserGroup) {
|
||||||
async function deleted(group: UserGroup) {
|
async function deleted(group: UserGroup) {
|
||||||
const properties: GroupDeletedEvent = {
|
const properties: GroupDeletedEvent = {
|
||||||
groupId: group._id as string,
|
groupId: group._id as string,
|
||||||
viaScim: context.isScimCall(),
|
viaScim: context.isScim(),
|
||||||
audited: {
|
audited: {
|
||||||
name: group.name,
|
name: group.name,
|
||||||
},
|
},
|
||||||
|
@ -49,7 +49,7 @@ async function usersAdded(count: number, group: UserGroup) {
|
||||||
const properties: GroupUsersAddedEvent = {
|
const properties: GroupUsersAddedEvent = {
|
||||||
count,
|
count,
|
||||||
groupId: group._id as string,
|
groupId: group._id as string,
|
||||||
viaScim: context.isScimCall(),
|
viaScim: context.isScim(),
|
||||||
audited: {
|
audited: {
|
||||||
name: group.name,
|
name: group.name,
|
||||||
},
|
},
|
||||||
|
@ -61,7 +61,7 @@ async function usersDeleted(count: number, group: UserGroup) {
|
||||||
const properties: GroupUsersDeletedEvent = {
|
const properties: GroupUsersDeletedEvent = {
|
||||||
count,
|
count,
|
||||||
groupId: group._id as string,
|
groupId: group._id as string,
|
||||||
viaScim: context.isScimCall(),
|
viaScim: context.isScim(),
|
||||||
audited: {
|
audited: {
|
||||||
name: group.name,
|
name: group.name,
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,7 +20,7 @@ import { context } from "../.."
|
||||||
async function created(user: User, timestamp?: number) {
|
async function created(user: User, timestamp?: number) {
|
||||||
const properties: UserCreatedEvent = {
|
const properties: UserCreatedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
viaScim: context.isScimCall(),
|
viaScim: context.isScim(),
|
||||||
audited: {
|
audited: {
|
||||||
email: user.email,
|
email: user.email,
|
||||||
},
|
},
|
||||||
|
@ -31,7 +31,7 @@ async function created(user: User, timestamp?: number) {
|
||||||
async function updated(user: User) {
|
async function updated(user: User) {
|
||||||
const properties: UserUpdatedEvent = {
|
const properties: UserUpdatedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
viaScim: context.isScimCall(),
|
viaScim: context.isScim(),
|
||||||
audited: {
|
audited: {
|
||||||
email: user.email,
|
email: user.email,
|
||||||
},
|
},
|
||||||
|
@ -42,7 +42,7 @@ async function updated(user: User) {
|
||||||
async function deleted(user: User) {
|
async function deleted(user: User) {
|
||||||
const properties: UserDeletedEvent = {
|
const properties: UserDeletedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
viaScim: context.isScimCall(),
|
viaScim: context.isScim(),
|
||||||
audited: {
|
audited: {
|
||||||
email: user.email,
|
email: user.email,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue