mirror of https://github.com/boxyhq/jackson.git
Merge branch 'main' into feat/audit-logs-saas-app
This commit is contained in:
commit
e0c7592f33
|
@ -68,9 +68,9 @@ const adminPortalGroup = {
|
|||
let client: Retraced.Client | null = null;
|
||||
|
||||
// Check if audit log is enabled for a given group
|
||||
const auditLogEnabledFor = (groupId: string) => {
|
||||
return auditLogEnabledGroup.includes(groupId);
|
||||
};
|
||||
// const auditLogEnabledFor = (groupId: string) => {
|
||||
// return auditLogEnabledGroup.includes(groupId);
|
||||
// };
|
||||
|
||||
// Create a Retraced client
|
||||
const getClient = async () => {
|
||||
|
@ -150,11 +150,16 @@ const reportEvent = async (params: ReportEventParams) => {
|
|||
}
|
||||
}
|
||||
|
||||
// Skip reporting if audit log is not enabled for the team
|
||||
if (retracedEvent.group?.id && !auditLogEnabledFor(retracedEvent.group?.id)) {
|
||||
if (!retracedEvent.group?.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (auditLogEnabledGroup.length && !auditLogEnabledGroup.includes(retracedEvent.group?.id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(retracedEvent);
|
||||
|
||||
await retracedClient.reportEvent(retracedEvent);
|
||||
} catch (error: any) {
|
||||
console.error('Error reporting event to Retraced', error);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -66,7 +66,7 @@
|
|||
"chroma-js": "2.4.2",
|
||||
"classnames": "2.5.1",
|
||||
"cors": "2.8.5",
|
||||
"daisyui": "4.4.24",
|
||||
"daisyui": "4.5.0",
|
||||
"i18next": "22.5.1",
|
||||
"medium-zoom": "1.1.0",
|
||||
"micromatch": "4.0.5",
|
||||
|
|
Loading…
Reference in New Issue