1
0
Fork 0
mirror of synced 2024-08-15 01:51:33 +12:00

Minor fixes for friendly audited events, and a new function for comparing app IDs.

This commit is contained in:
mike12345567 2023-02-20 17:20:42 +00:00
parent b60013cbb8
commit 6cc96f39b1
3 changed files with 12 additions and 2 deletions

View file

@ -392,6 +392,16 @@ export async function getDevAppIDs() {
return apps.filter((id: any) => isDevAppID(id)) return apps.filter((id: any) => isDevAppID(id))
} }
export function isSameAppID(
appId1: string | undefined,
appId2: string | undefined
) {
if (appId1 == undefined || appId2 == undefined) {
return false
}
return getProdAppID(appId1) === getProdAppID(appId2)
}
export async function dbExists(dbName: any) { export async function dbExists(dbName: any) {
return doWithDB( return doWithDB(
dbName, dbName,

View file

@ -35,5 +35,5 @@ export interface SearchAuditLogsResponse extends PaginationResponse {
} }
export interface DefinitionsAuditLogsResponse { export interface DefinitionsAuditLogsResponse {
events: typeof AuditedEventFriendlyName events: Record<string, string>
} }

View file

@ -197,7 +197,7 @@ export const AuditedEventFriendlyName: Record<Event, string | undefined> = {
[Event.USER_PERMISSION_ADMIN_REMOVED]: `User "{{ email }}" admin role removed`, [Event.USER_PERMISSION_ADMIN_REMOVED]: `User "{{ email }}" admin role removed`,
[Event.USER_PERMISSION_BUILDER_ASSIGNED]: `User "{{ email }}" builder role assigned`, [Event.USER_PERMISSION_BUILDER_ASSIGNED]: `User "{{ email }}" builder role assigned`,
[Event.USER_PERMISSION_BUILDER_REMOVED]: `User "{{ email }}" builder role removed`, [Event.USER_PERMISSION_BUILDER_REMOVED]: `User "{{ email }}" builder role removed`,
[Event.USER_INVITED]: `User "{{ email }} invited`, [Event.USER_INVITED]: `User "{{ email }}" invited`,
[Event.USER_INVITED_ACCEPTED]: `User "{{ email }}" accepted invite`, [Event.USER_INVITED_ACCEPTED]: `User "{{ email }}" accepted invite`,
[Event.USER_PASSWORD_UPDATED]: `User "{{ email }}" password updated`, [Event.USER_PASSWORD_UPDATED]: `User "{{ email }}" password updated`,
[Event.USER_PASSWORD_RESET_REQUESTED]: `User "{{ email }}" password reset requested`, [Event.USER_PASSWORD_RESET_REQUESTED]: `User "{{ email }}" password reset requested`,