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