Add viaScim to group events
This commit is contained in:
parent
7821c637c6
commit
8a6400c7d0
2 changed files with 11 additions and 1 deletions
|
@ -9,12 +9,13 @@ import {
|
|||
GroupUsersDeletedEvent,
|
||||
GroupAddedOnboardingEvent,
|
||||
GroupPermissionsEditedEvent,
|
||||
UserGroupRoles,
|
||||
} from "@budibase/types"
|
||||
import { context } from "../.."
|
||||
|
||||
async function created(group: UserGroup, timestamp?: number) {
|
||||
const properties: GroupCreatedEvent = {
|
||||
groupId: group._id as string,
|
||||
viaScim: context.isScimCall(),
|
||||
audited: {
|
||||
name: group.name,
|
||||
},
|
||||
|
@ -25,6 +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(),
|
||||
audited: {
|
||||
name: group.name,
|
||||
},
|
||||
|
@ -35,6 +37,7 @@ async function updated(group: UserGroup) {
|
|||
async function deleted(group: UserGroup) {
|
||||
const properties: GroupDeletedEvent = {
|
||||
groupId: group._id as string,
|
||||
viaScim: context.isScimCall(),
|
||||
audited: {
|
||||
name: group.name,
|
||||
},
|
||||
|
@ -46,6 +49,7 @@ async function usersAdded(count: number, group: UserGroup) {
|
|||
const properties: GroupUsersAddedEvent = {
|
||||
count,
|
||||
groupId: group._id as string,
|
||||
viaScim: context.isScimCall(),
|
||||
audited: {
|
||||
name: group.name,
|
||||
},
|
||||
|
@ -57,6 +61,7 @@ async function usersDeleted(count: number, group: UserGroup) {
|
|||
const properties: GroupUsersDeletedEvent = {
|
||||
count,
|
||||
groupId: group._id as string,
|
||||
viaScim: context.isScimCall(),
|
||||
audited: {
|
||||
name: group.name,
|
||||
},
|
||||
|
|
|
@ -2,6 +2,7 @@ import { BaseEvent } from "./event"
|
|||
|
||||
export interface GroupCreatedEvent extends BaseEvent {
|
||||
groupId: string
|
||||
viaScim?: boolean
|
||||
audited: {
|
||||
name: string
|
||||
}
|
||||
|
@ -9,6 +10,7 @@ export interface GroupCreatedEvent extends BaseEvent {
|
|||
|
||||
export interface GroupUpdatedEvent extends BaseEvent {
|
||||
groupId: string
|
||||
viaScim?: boolean
|
||||
audited: {
|
||||
name: string
|
||||
}
|
||||
|
@ -16,6 +18,7 @@ export interface GroupUpdatedEvent extends BaseEvent {
|
|||
|
||||
export interface GroupDeletedEvent extends BaseEvent {
|
||||
groupId: string
|
||||
viaScim?: boolean
|
||||
audited: {
|
||||
name: string
|
||||
}
|
||||
|
@ -24,6 +27,7 @@ export interface GroupDeletedEvent extends BaseEvent {
|
|||
export interface GroupUsersAddedEvent extends BaseEvent {
|
||||
count: number
|
||||
groupId: string
|
||||
viaScim?: boolean
|
||||
audited: {
|
||||
name: string
|
||||
}
|
||||
|
@ -32,6 +36,7 @@ export interface GroupUsersAddedEvent extends BaseEvent {
|
|||
export interface GroupUsersDeletedEvent extends BaseEvent {
|
||||
count: number
|
||||
groupId: string
|
||||
viaScim?: boolean
|
||||
audited: {
|
||||
name: string
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue