1.0.13
This commit is contained in:
1 parent
a88d3d5788
commit
8f3a7eb435
96 files changed
+5235
-1870
No files matched your search
@@ -207,6 +207,24 @@ export async function auditUser(
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for role actions
|
||||
*/
|
||||
export async function auditRole(
|
||||
event: RequestEvent,
|
||||
action: AuditAction,
|
||||
roleId: number,
|
||||
roleName: string,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, action, 'role', {
|
||||
entityId: String(roleId),
|
||||
entityName: roleName,
|
||||
description: `Role ${roleName} ${action}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for settings actions
|
||||
*/
|
||||
@@ -261,6 +279,134 @@ export async function auditRegistry(
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for git repository actions
|
||||
*/
|
||||
export async function auditGitRepository(
|
||||
event: RequestEvent,
|
||||
action: AuditAction,
|
||||
repositoryId: number,
|
||||
repositoryName: string,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, action, 'git_repository', {
|
||||
entityId: String(repositoryId),
|
||||
entityName: repositoryName,
|
||||
description: `Git repository ${repositoryName} ${action}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for git credential actions
|
||||
*/
|
||||
export async function auditGitCredential(
|
||||
event: RequestEvent,
|
||||
action: AuditAction,
|
||||
credentialId: number,
|
||||
credentialName: string,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, action, 'git_credential', {
|
||||
entityId: String(credentialId),
|
||||
entityName: credentialName,
|
||||
description: `Git credential ${credentialName} ${action}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for config set actions
|
||||
*/
|
||||
export async function auditConfigSet(
|
||||
event: RequestEvent,
|
||||
action: AuditAction,
|
||||
configSetId: number,
|
||||
configSetName: string,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, action, 'config_set', {
|
||||
entityId: String(configSetId),
|
||||
entityName: configSetName,
|
||||
description: `Config set ${configSetName} ${action}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for notification channel actions
|
||||
*/
|
||||
export async function auditNotification(
|
||||
event: RequestEvent,
|
||||
action: AuditAction,
|
||||
notificationId: number,
|
||||
notificationName: string,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, action, 'notification', {
|
||||
entityId: String(notificationId),
|
||||
entityName: notificationName,
|
||||
description: `Notification channel ${notificationName} ${action}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for OIDC provider actions
|
||||
*/
|
||||
export async function auditOidcProvider(
|
||||
event: RequestEvent,
|
||||
action: AuditAction,
|
||||
providerId: number,
|
||||
providerName: string,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, action, 'oidc_provider', {
|
||||
entityId: String(providerId),
|
||||
entityName: providerName,
|
||||
description: `OIDC provider ${providerName} ${action}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for LDAP config actions
|
||||
*/
|
||||
export async function auditLdapConfig(
|
||||
event: RequestEvent,
|
||||
action: AuditAction,
|
||||
configId: number,
|
||||
configName: string,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, action, 'ldap_config', {
|
||||
entityId: String(configId),
|
||||
entityName: configName,
|
||||
description: `LDAP config ${configName} ${action}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for git stack actions
|
||||
*/
|
||||
export async function auditGitStack(
|
||||
event: RequestEvent,
|
||||
action: AuditAction,
|
||||
stackId: number,
|
||||
stackName: string,
|
||||
environmentId?: number | null,
|
||||
details?: any
|
||||
): Promise<void> {
|
||||
await audit(event, action, 'git_stack', {
|
||||
entityId: String(stackId),
|
||||
entityName: stackName,
|
||||
environmentId,
|
||||
description: `Git stack ${stackName} ${action}`,
|
||||
details
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for auth actions (login/logout)
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user