mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00: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:
@@ -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(),
|
||||
};
|
||||
});
|
||||
|
||||
@@ -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",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user