Minor fixes for friendly audited events, and a new function for comparing app IDs.
This commit is contained in:
parent
b60013cbb8
commit
6cc96f39b1
3 changed files with 12 additions and 2 deletions
|
@ -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,
|
||||||
|
|
|
@ -35,5 +35,5 @@ export interface SearchAuditLogsResponse extends PaginationResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DefinitionsAuditLogsResponse {
|
export interface DefinitionsAuditLogsResponse {
|
||||||
events: typeof AuditedEventFriendlyName
|
events: Record<string, string>
|
||||||
}
|
}
|
||||||
|
|
|
@ -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`,
|
||||||
|
|
Loading…
Reference in a new issue