1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-21 11:35:34 +01:00

[AC-2614] Member Access Localization (#10931)

* Initial setup and modifications for member access report api implementation

* Adding the permissions logic for getting the permissions text

* fixing the test cases

* Some refactoring on async calls

* Comments on the model

* Resolving the mock issue

* messages

* Localization of text

* One more file to fix merge
This commit is contained in:
Tom 2024-09-09 11:48:08 -04:00 committed by GitHub
parent 456b156729
commit 8a199a1f66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 41 additions and 9 deletions

View File

@ -8756,6 +8756,27 @@
"memberAccessReportPageDesc": {
"message": "Audit organization member access across groups, collections, and collection items. The CSV export provides a detailed breakdown per member, including information on collection permissions and account configurations."
},
"memberAccessReportNoCollection": {
"message": "(No Collection)"
},
"memberAccessReportNoCollectionPermission": {
"message": "(No Collection Permission)"
},
"memberAccessReportNoGroup": {
"message": "(No Group)"
},
"memberAccessReportTwoFactorEnabledTrue": {
"message": "On"
},
"memberAccessReportTwoFactorEnabledFalse": {
"message": "Off"
},
"memberAccessReportAuthenticationEnabledTrue": {
"message": "On"
},
"memberAccessReportAuthenticationEnabledFalse": {
"message": "Off"
},
"higherKDFIterations": {
"message": "Higher KDF iterations can help protect your master password from being brute forced by an attacker."
},

View File

@ -64,14 +64,25 @@ export class MemberAccessReportService {
const exportItems = memberAccessReports.flatMap((report) => {
const userDetails = report.accessDetails.map((detail) => {
const collectionName = collectionNameMap.get(detail.collectionName.encryptedString);
return {
email: report.email,
name: report.userName,
twoStepLogin: report.twoFactorEnabled ? "On" : "Off",
accountRecovery: report.accountRecoveryEnabled ? "On" : "Off",
group: detail.groupName,
collection: collectionNameMap.get(detail.collectionName.encryptedString),
collectionPermission: this.getPermissionText(detail),
twoStepLogin: report.twoFactorEnabled
? this.i18nService.t("memberAccessReportTwoFactorEnabledTrue")
: this.i18nService.t("memberAccessReportTwoFactorEnabledFalse"),
accountRecovery: report.accountRecoveryEnabled
? this.i18nService.t("memberAccessReportAuthenticationEnabledTrue")
: this.i18nService.t("memberAccessReportAuthenticationEnabledFalse"),
group: detail.groupName
? detail.groupName
: this.i18nService.t("memberAccessReportNoGroup"),
collection: collectionName
? collectionName
: this.i18nService.t("memberAccessReportNoCollection"),
collectionPermission: detail.collectionId
? this.getPermissionText(detail)
: this.i18nService.t("memberAccessReportNoCollection"),
totalItems: detail.itemCount.toString(),
};
});

View File

@ -10,12 +10,12 @@ export type MemberAccessExportItem = {
};
export const userReportItemHeaders: { [key in keyof MemberAccessExportItem]: string } = {
email: "Email Address",
name: "Full Name",
email: "Email",
name: "Name",
twoStepLogin: "Two-Step Login",
accountRecovery: "Account Recovery",
group: "Group Name",
collection: "Collection Name",
group: "Group",
collection: "Collection",
collectionPermission: "Collection Permission",
totalItems: "Total Items",
};