mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[SM-1273] Adding enums for additional event logs for secrets (#15274)
* Adding enums for additional event logs for secrets * updating messages * Updating messages to be consistent for logs
This commit is contained in:
@@ -467,8 +467,20 @@ export class EventService {
|
|||||||
break;
|
break;
|
||||||
// Secrets Manager
|
// Secrets Manager
|
||||||
case EventType.Secret_Retrieved:
|
case EventType.Secret_Retrieved:
|
||||||
msg = this.i18nService.t("accessedSecret", this.formatSecretId(ev));
|
msg = this.i18nService.t("accessedSecretWithId", this.formatSecretId(ev));
|
||||||
humanReadableMsg = this.i18nService.t("accessedSecret", this.getShortId(ev.secretId));
|
humanReadableMsg = this.i18nService.t("accessedSecretWithId", this.getShortId(ev.secretId));
|
||||||
|
break;
|
||||||
|
case EventType.Secret_Created:
|
||||||
|
msg = this.i18nService.t("createdSecretWithId", this.formatSecretId(ev));
|
||||||
|
humanReadableMsg = this.i18nService.t("createdSecretWithId", this.getShortId(ev.secretId));
|
||||||
|
break;
|
||||||
|
case EventType.Secret_Deleted:
|
||||||
|
msg = this.i18nService.t("deletedSecretWithId", this.formatSecretId(ev));
|
||||||
|
humanReadableMsg = this.i18nService.t("deletedSecretWithId", this.getShortId(ev.secretId));
|
||||||
|
break;
|
||||||
|
case EventType.Secret_Edited:
|
||||||
|
msg = this.i18nService.t("editedSecretWithId", this.formatSecretId(ev));
|
||||||
|
humanReadableMsg = this.i18nService.t("editedSecretWithId", this.getShortId(ev.secretId));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -8237,6 +8237,15 @@
|
|||||||
"errorReadingImportFile": {
|
"errorReadingImportFile": {
|
||||||
"message": "An error occurred when trying to read the import file"
|
"message": "An error occurred when trying to read the import file"
|
||||||
},
|
},
|
||||||
|
"accessedSecretWithId": {
|
||||||
|
"message": "Accessed a secret with identifier: $SECRET_ID$",
|
||||||
|
"placeholders": {
|
||||||
|
"secret_id": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "4d34e8a8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"accessedSecret": {
|
"accessedSecret": {
|
||||||
"message": "Accessed secret $SECRET_ID$.",
|
"message": "Accessed secret $SECRET_ID$.",
|
||||||
"placeholders": {
|
"placeholders": {
|
||||||
@@ -8245,6 +8254,33 @@
|
|||||||
"example": "4d34e8a8"
|
"example": "4d34e8a8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"editedSecretWithId": {
|
||||||
|
"message": "Edited a secret with identifier: $SECRET_ID$",
|
||||||
|
"placeholders": {
|
||||||
|
"secret_id": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "4d34e8a8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"deletedSecretWithId": {
|
||||||
|
"message": "Deleted a secret with identifier: $SECRET_ID$",
|
||||||
|
"placeholders": {
|
||||||
|
"secret_id": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "4d34e8a8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"createdSecretWithId": {
|
||||||
|
"message": "Created a new secret with identifier: $SECRET_ID$",
|
||||||
|
"placeholders": {
|
||||||
|
"secret_id": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "4d34e8a8"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"message": "SDK",
|
"message": "SDK",
|
||||||
|
|||||||
@@ -90,4 +90,7 @@ export enum EventType {
|
|||||||
OrganizationDomain_NotVerified = 2003,
|
OrganizationDomain_NotVerified = 2003,
|
||||||
|
|
||||||
Secret_Retrieved = 2100,
|
Secret_Retrieved = 2100,
|
||||||
|
Secret_Created = 2101,
|
||||||
|
Secret_Edited = 2102,
|
||||||
|
Secret_Deleted = 2103,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user