bitwarden-estensione-browser/apps/web/src/app/organizations/layouts/organization-layout.compone...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

96 lines
2.8 KiB
TypeScript
Raw Normal View History

2018-06-08 23:08:19 +02:00
import { Component, NgZone, OnDestroy, OnInit } from "@angular/core";
2018-07-03 21:11:58 +02:00
import { ActivatedRoute } from "@angular/router";
2022-06-14 17:10:53 +02:00
import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service";
import { OrganizationService } from "@bitwarden/common/abstractions/organization.service";
import { Organization } from "@bitwarden/common/models/domain/organization";
2018-06-08 23:08:19 +02:00
[SG-220] End User Vault Refresh (#1640) * Add premium badge component (#1525) * [Vault Refresh] Nav update and Options -> Preferences (#1530) * Update jslib * [End User Vault Refresh] Security sub-page (#1538) * [End User Vault Refresh] Security section * Updated routing module * Update routing for change-password * Updated buttons of all modified classes // imported button module * Converted modified class to use bit-callout * removed comments * Update small button to current cl button * Update jslib and consequential updates * [End User Vault Refresh] Vault - remove Org and Provider cards (#1529) * Update reports page (#1536) * [End User Vault Refresh] Organizations - updated nav and route permissions (#1551) * Add Organizations link to navbar * Update route permissions and guards * Use NavigationPermissionsService to unify route permissions * Rename "My Vault" to "Vaults" (#1569) * [euvr] Adjust Vault width based on card visibility (#1588) * [SG-31 End User Vault Refresh] Account Menu updates (#1596) * Add menuModule * Use bit-menu for account menu * Fix styling, replace CSS with TW * Change out bootstrap styling * Fix styling * Fix styling * Rename My Account to Account Settings * WIP use Avatar for account menu * Revert "WIP use Avatar for account menu" This reverts commit d58bea4874d94d5cdf5a96f7047623b1e0c839b7. * Update jslib from feature branch * [End User Vault Refresh] SG-16: Organization filters (#1595) * [feature] Base implementation of EUVR filter changes * [refactor] Relocated vault-filters to app/modules * [refactor] Reuse vault-filters component for organizations * [refactor] Remove unused org filter component * [bug] .gitmodules branch change * [bug] Load organization filters after sync during login * [refactor] Introduce a SharedModule * [refactor] Created a home for loose components * [refactor] Convert VaultComponent and OrgVaultComponent into a pair of modules * [refactor] Implement <bit-menu> for organization filter actions * [feature] Improve a11y standards of the vault filters module * [bug] Recreate package-lock.json * Fix build issue * [bug] Remove duplicate this.go() call * [fix] Use correct filter-buttons class Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Hinton <oscar@oscarhinton.com> * [SG-32] Add Ownership badge to vault items (#1623) * [feature] Base implementation of EUVR filter changes * [refactor] Relocated vault-filters to app/modules * [refactor] Reuse vault-filters component for organizations * [refactor] Remove unused org filter component * [bug] .gitmodules branch change * [bug] Load organization filters after sync during login * [refactor] Introduce a SharedModule * [refactor] Created a home for loose components * [refactor] Convert VaultComponent and OrgVaultComponent into a pair of modules * [refactor] Implement <bit-menu> for organization filter actions * [feature] Improve a11y standards of the vault filters module * [bug] Recreate package-lock.json * Fix build issue * [bug] Remove duplicate this.go() call * Add organization owner badge to vault items * Fix capitalization * Re-organize new components into modules * Use tailwind css class Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Hinton <oscar@oscarhinton.com> * [EUVR] Merge master into feature branch (#1637) * Update jslib (#1602) * Update jslib * Update name of UserVerificationComponent * Bumped version to 2.28.0 (#1603) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [EC-161] Bump braintree (#1606) * [PS-211] [PS-212] Make Generator page accessible (#1607) * Fix grouping of radiobutton inputs * Add role=radiogroup * Add aria-labelledBy to radio button groups * Add reorganization notice (#1610) * Add aria attributes to password gen options (#1611) * [EC-143] [BEEEP] Allow linking to ciphers (#1579) Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Fix login sponsorship redirect (#1620) * Contribution Documentation edits (#1599) Making corrections to the mobile contributions doc: Update Crowdin contact from Kyle to dwbit. Update 'User-to-User Support' forum category to 'Ask the Bitwarden Community' * Add description for the A-Z & a-z items (#1615) * Add description for reports message (#1600) Add "Vault Health Reports can be used to evaluate the security of your Bitwarden Personal or Organization Vault" description to the source string, "Identify and close security gaps in your online accounts by clicking the reports below." * [PS-301] Load OssModule from BitwardenLicense (#1626) * Bumped version to 2.28.1 (#1629) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [EC-154] [BEEEP] Remove factory providers in Angular DI (#1609) * use InjectionTokens * Use InitService * PS-79 Updated two-factor component to to align to jslib change to send the deviceId on 2fa email resend code (#1624) * [PS-74] Fix user authentication state checks (#1632) * Update to use new authStatus method * Delete unused services and import * update jslib * [PS-381] Fix locale being empty when not configuring a language (#1631) * Forwarded email providers to username generator (#1628) * forwarded emails * firefox relay * remove firefox relay * update jslib ref * remove dupe logService * Update localization description for 'random' (#1633) Adding description string for 'random' * DEVOPS-758 - Move Web deploy from GitHub Pages to CloudFlare Pages (#1627) * Update jslib * Run npm i after merge with master * Update name of UserVerificationComponent * Fix lazy loading of routing modules * Routing modules should have routing in their name * Revert "Fix lazy loading of routing modules" This reverts commit 59d4e6e06caf54692db8662fb4ed799dc2836dc3. * Do not eagerly load feature modules Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Oscar Hinton <oscar@oscarhinton.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: dwbit <98768076+dwbit@users.noreply.github.com> Co-authored-by: Federico Maccaroni <fedemkr@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com> Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> * Do not render org options menu until loaded (#1638) * [SG-31 End User Vault Refresh] Update cipher options menu (#1593) * Update Vault cipher option menus * Update Send list to use same style * [SG-207] [EUVR] Remove Organizations from Settings page (#1619) * [fix] Cut off overflow text for link buttons (#1639) * [SG-225] Remove BaseGuard (#1641) * [SG-34 End User Vault Refresh] Organization Switcher (#1550) * [euvr] Subscription/Billing updates (#1576) * [euvr] Subscription changes * Revert testing bang * Removed final instance of getUserBilling * Moved to feature/endUserVaultRefresh remote branch and updated to latest * Removed org-billing changes * Updated premium component header * Updated stateservice path * Updated billing component name * Reverting org-billing decouple * Using tailwind classes for CL objects * Added TODO * Removed divider for components within new tab nav * Update jslib/add components to loose-components module * Updated routing lazy load module name to match existing pattern * Fixed bug with redirect // Added button type // Removed headers for tabbed pages * Revert changes to .gitmodules * [dep] Update jslib Co-authored-by: Oscar Hinton <oscar@oscarhinton.com> Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com> Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: dwbit <98768076+dwbit@users.noreply.github.com> Co-authored-by: Federico Maccaroni <fedemkr@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com> Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2022-05-09 14:21:52 +02:00
import { NavigationPermissionsService } from "../services/navigation-permissions.service";
const BroadcasterSubscriptionId = "OrganizationLayoutComponent";
2018-06-08 23:08:19 +02:00
@Component({
selector: "app-organization-layout",
templateUrl: "organization-layout.component.html",
})
export class OrganizationLayoutComponent implements OnInit, OnDestroy {
2018-07-03 21:11:58 +02:00
organization: Organization;
businessTokenPromise: Promise<any>;
2018-07-03 21:11:58 +02:00
private organizationId: string;
[Account Switching] [Refactor] Implement new account centric services (#1220) * [chore] updated services.module to use account services * [refactor] sorted services provided by services.module * [chore] removed references to deleted jslib services * [chore] used activeAccount over storageService for account level storage items * [chore] resolved linter warnings * Refactor activeAccountService to stateService * [bug] Remove uneeded calls to state service on logout This was causing console erros on logout. Clearing of data is handled fully in dedicated services, clearing them in state afterwards is essentially a redundant call. * [bug] Add back null locked callback to VaultTimeoutService * Move call to get showUpdateKey * [bug] Ensure HtmlStorageService does not override StateService options and locations * [bug] Adjust theme logic to pull from the new storage locations * [bug] Correct theme not sticking on refresh * [bug] Add enableFullWidth to the account model * [bug] fix theme option empty when light is selected * [bug] init state on application start * [bug] Reinit state when coming back from a lock * [style] Fix lint complaints * [bug] Clean state on logout * [chore] Resolved merge issues * [bug] Correct default for enableGravitars * Bump angular to 12. * Remove angular.json * Bump rxjs * Fix build errors, remove file-loader with asset/resource * Use contenthash * Bump jslib * Bump ngx-toastr * [chore] resolve issues from merge * [chore] resolve issues from merge * [bug] Add missing bracket * Use newer import syntax * [bug] Correct service orge * [style] Fix lint complaints * [chore] update jslib * [review] Address code review * [review] Address code review * [review] Rename providerService to webProviderService Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com> Co-authored-by: Hinton <oscar@oscarhinton.com>
2021-12-14 17:10:26 +01:00
constructor(
private route: ActivatedRoute,
private organizationService: OrganizationService,
private broadcasterService: BroadcasterService,
private ngZone: NgZone
) {}
2018-07-03 21:11:58 +02:00
ngOnInit() {
2018-07-06 22:36:51 +02:00
document.body.classList.remove("layout_frontend");
[SG-220] End User Vault Refresh (#1640) * Add premium badge component (#1525) * [Vault Refresh] Nav update and Options -> Preferences (#1530) * Update jslib * [End User Vault Refresh] Security sub-page (#1538) * [End User Vault Refresh] Security section * Updated routing module * Update routing for change-password * Updated buttons of all modified classes // imported button module * Converted modified class to use bit-callout * removed comments * Update small button to current cl button * Update jslib and consequential updates * [End User Vault Refresh] Vault - remove Org and Provider cards (#1529) * Update reports page (#1536) * [End User Vault Refresh] Organizations - updated nav and route permissions (#1551) * Add Organizations link to navbar * Update route permissions and guards * Use NavigationPermissionsService to unify route permissions * Rename "My Vault" to "Vaults" (#1569) * [euvr] Adjust Vault width based on card visibility (#1588) * [SG-31 End User Vault Refresh] Account Menu updates (#1596) * Add menuModule * Use bit-menu for account menu * Fix styling, replace CSS with TW * Change out bootstrap styling * Fix styling * Fix styling * Rename My Account to Account Settings * WIP use Avatar for account menu * Revert "WIP use Avatar for account menu" This reverts commit d58bea4874d94d5cdf5a96f7047623b1e0c839b7. * Update jslib from feature branch * [End User Vault Refresh] SG-16: Organization filters (#1595) * [feature] Base implementation of EUVR filter changes * [refactor] Relocated vault-filters to app/modules * [refactor] Reuse vault-filters component for organizations * [refactor] Remove unused org filter component * [bug] .gitmodules branch change * [bug] Load organization filters after sync during login * [refactor] Introduce a SharedModule * [refactor] Created a home for loose components * [refactor] Convert VaultComponent and OrgVaultComponent into a pair of modules * [refactor] Implement <bit-menu> for organization filter actions * [feature] Improve a11y standards of the vault filters module * [bug] Recreate package-lock.json * Fix build issue * [bug] Remove duplicate this.go() call * [fix] Use correct filter-buttons class Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Hinton <oscar@oscarhinton.com> * [SG-32] Add Ownership badge to vault items (#1623) * [feature] Base implementation of EUVR filter changes * [refactor] Relocated vault-filters to app/modules * [refactor] Reuse vault-filters component for organizations * [refactor] Remove unused org filter component * [bug] .gitmodules branch change * [bug] Load organization filters after sync during login * [refactor] Introduce a SharedModule * [refactor] Created a home for loose components * [refactor] Convert VaultComponent and OrgVaultComponent into a pair of modules * [refactor] Implement <bit-menu> for organization filter actions * [feature] Improve a11y standards of the vault filters module * [bug] Recreate package-lock.json * Fix build issue * [bug] Remove duplicate this.go() call * Add organization owner badge to vault items * Fix capitalization * Re-organize new components into modules * Use tailwind css class Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Hinton <oscar@oscarhinton.com> * [EUVR] Merge master into feature branch (#1637) * Update jslib (#1602) * Update jslib * Update name of UserVerificationComponent * Bumped version to 2.28.0 (#1603) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [EC-161] Bump braintree (#1606) * [PS-211] [PS-212] Make Generator page accessible (#1607) * Fix grouping of radiobutton inputs * Add role=radiogroup * Add aria-labelledBy to radio button groups * Add reorganization notice (#1610) * Add aria attributes to password gen options (#1611) * [EC-143] [BEEEP] Allow linking to ciphers (#1579) Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Fix login sponsorship redirect (#1620) * Contribution Documentation edits (#1599) Making corrections to the mobile contributions doc: Update Crowdin contact from Kyle to dwbit. Update 'User-to-User Support' forum category to 'Ask the Bitwarden Community' * Add description for the A-Z & a-z items (#1615) * Add description for reports message (#1600) Add "Vault Health Reports can be used to evaluate the security of your Bitwarden Personal or Organization Vault" description to the source string, "Identify and close security gaps in your online accounts by clicking the reports below." * [PS-301] Load OssModule from BitwardenLicense (#1626) * Bumped version to 2.28.1 (#1629) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [EC-154] [BEEEP] Remove factory providers in Angular DI (#1609) * use InjectionTokens * Use InitService * PS-79 Updated two-factor component to to align to jslib change to send the deviceId on 2fa email resend code (#1624) * [PS-74] Fix user authentication state checks (#1632) * Update to use new authStatus method * Delete unused services and import * update jslib * [PS-381] Fix locale being empty when not configuring a language (#1631) * Forwarded email providers to username generator (#1628) * forwarded emails * firefox relay * remove firefox relay * update jslib ref * remove dupe logService * Update localization description for 'random' (#1633) Adding description string for 'random' * DEVOPS-758 - Move Web deploy from GitHub Pages to CloudFlare Pages (#1627) * Update jslib * Run npm i after merge with master * Update name of UserVerificationComponent * Fix lazy loading of routing modules * Routing modules should have routing in their name * Revert "Fix lazy loading of routing modules" This reverts commit 59d4e6e06caf54692db8662fb4ed799dc2836dc3. * Do not eagerly load feature modules Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Oscar Hinton <oscar@oscarhinton.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: dwbit <98768076+dwbit@users.noreply.github.com> Co-authored-by: Federico Maccaroni <fedemkr@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com> Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> * Do not render org options menu until loaded (#1638) * [SG-31 End User Vault Refresh] Update cipher options menu (#1593) * Update Vault cipher option menus * Update Send list to use same style * [SG-207] [EUVR] Remove Organizations from Settings page (#1619) * [fix] Cut off overflow text for link buttons (#1639) * [SG-225] Remove BaseGuard (#1641) * [SG-34 End User Vault Refresh] Organization Switcher (#1550) * [euvr] Subscription/Billing updates (#1576) * [euvr] Subscription changes * Revert testing bang * Removed final instance of getUserBilling * Moved to feature/endUserVaultRefresh remote branch and updated to latest * Removed org-billing changes * Updated premium component header * Updated stateservice path * Updated billing component name * Reverting org-billing decouple * Using tailwind classes for CL objects * Added TODO * Removed divider for components within new tab nav * Update jslib/add components to loose-components module * Updated routing lazy load module name to match existing pattern * Fixed bug with redirect // Added button type // Removed headers for tabbed pages * Revert changes to .gitmodules * [dep] Update jslib Co-authored-by: Oscar Hinton <oscar@oscarhinton.com> Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com> Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: dwbit <98768076+dwbit@users.noreply.github.com> Co-authored-by: Federico Maccaroni <fedemkr@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com> Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2022-05-09 14:21:52 +02:00
this.route.params.subscribe(async (params: any) => {
2018-07-03 21:11:58 +02:00
this.organizationId = params.organizationId;
await this.load();
2021-12-17 15:57:11 +01:00
});
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {
this.ngZone.run(async () => {
switch (message.command) {
case "updatedOrgLicense":
2018-07-03 21:11:58 +02:00
await this.load();
break;
}
2021-12-17 15:57:11 +01:00
});
});
}
ngOnDestroy() {
this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);
2018-07-03 21:11:58 +02:00
}
async load() {
[Account Switching] [Refactor] Implement new account centric services (#1220) * [chore] updated services.module to use account services * [refactor] sorted services provided by services.module * [chore] removed references to deleted jslib services * [chore] used activeAccount over storageService for account level storage items * [chore] resolved linter warnings * Refactor activeAccountService to stateService * [bug] Remove uneeded calls to state service on logout This was causing console erros on logout. Clearing of data is handled fully in dedicated services, clearing them in state afterwards is essentially a redundant call. * [bug] Add back null locked callback to VaultTimeoutService * Move call to get showUpdateKey * [bug] Ensure HtmlStorageService does not override StateService options and locations * [bug] Adjust theme logic to pull from the new storage locations * [bug] Correct theme not sticking on refresh * [bug] Add enableFullWidth to the account model * [bug] fix theme option empty when light is selected * [bug] init state on application start * [bug] Reinit state when coming back from a lock * [style] Fix lint complaints * [bug] Clean state on logout * [chore] Resolved merge issues * [bug] Correct default for enableGravitars * Bump angular to 12. * Remove angular.json * Bump rxjs * Fix build errors, remove file-loader with asset/resource * Use contenthash * Bump jslib * Bump ngx-toastr * [chore] resolve issues from merge * [chore] resolve issues from merge * [bug] Add missing bracket * Use newer import syntax * [bug] Correct service orge * [style] Fix lint complaints * [chore] update jslib * [review] Address code review * [review] Address code review * [review] Rename providerService to webProviderService Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com> Co-authored-by: Hinton <oscar@oscarhinton.com>
2021-12-14 17:10:26 +01:00
this.organization = await this.organizationService.get(this.organizationId);
2018-07-03 21:11:58 +02:00
}
get showManageTab(): boolean {
[SG-220] End User Vault Refresh (#1640) * Add premium badge component (#1525) * [Vault Refresh] Nav update and Options -> Preferences (#1530) * Update jslib * [End User Vault Refresh] Security sub-page (#1538) * [End User Vault Refresh] Security section * Updated routing module * Update routing for change-password * Updated buttons of all modified classes // imported button module * Converted modified class to use bit-callout * removed comments * Update small button to current cl button * Update jslib and consequential updates * [End User Vault Refresh] Vault - remove Org and Provider cards (#1529) * Update reports page (#1536) * [End User Vault Refresh] Organizations - updated nav and route permissions (#1551) * Add Organizations link to navbar * Update route permissions and guards * Use NavigationPermissionsService to unify route permissions * Rename "My Vault" to "Vaults" (#1569) * [euvr] Adjust Vault width based on card visibility (#1588) * [SG-31 End User Vault Refresh] Account Menu updates (#1596) * Add menuModule * Use bit-menu for account menu * Fix styling, replace CSS with TW * Change out bootstrap styling * Fix styling * Fix styling * Rename My Account to Account Settings * WIP use Avatar for account menu * Revert "WIP use Avatar for account menu" This reverts commit d58bea4874d94d5cdf5a96f7047623b1e0c839b7. * Update jslib from feature branch * [End User Vault Refresh] SG-16: Organization filters (#1595) * [feature] Base implementation of EUVR filter changes * [refactor] Relocated vault-filters to app/modules * [refactor] Reuse vault-filters component for organizations * [refactor] Remove unused org filter component * [bug] .gitmodules branch change * [bug] Load organization filters after sync during login * [refactor] Introduce a SharedModule * [refactor] Created a home for loose components * [refactor] Convert VaultComponent and OrgVaultComponent into a pair of modules * [refactor] Implement <bit-menu> for organization filter actions * [feature] Improve a11y standards of the vault filters module * [bug] Recreate package-lock.json * Fix build issue * [bug] Remove duplicate this.go() call * [fix] Use correct filter-buttons class Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Hinton <oscar@oscarhinton.com> * [SG-32] Add Ownership badge to vault items (#1623) * [feature] Base implementation of EUVR filter changes * [refactor] Relocated vault-filters to app/modules * [refactor] Reuse vault-filters component for organizations * [refactor] Remove unused org filter component * [bug] .gitmodules branch change * [bug] Load organization filters after sync during login * [refactor] Introduce a SharedModule * [refactor] Created a home for loose components * [refactor] Convert VaultComponent and OrgVaultComponent into a pair of modules * [refactor] Implement <bit-menu> for organization filter actions * [feature] Improve a11y standards of the vault filters module * [bug] Recreate package-lock.json * Fix build issue * [bug] Remove duplicate this.go() call * Add organization owner badge to vault items * Fix capitalization * Re-organize new components into modules * Use tailwind css class Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Hinton <oscar@oscarhinton.com> * [EUVR] Merge master into feature branch (#1637) * Update jslib (#1602) * Update jslib * Update name of UserVerificationComponent * Bumped version to 2.28.0 (#1603) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [EC-161] Bump braintree (#1606) * [PS-211] [PS-212] Make Generator page accessible (#1607) * Fix grouping of radiobutton inputs * Add role=radiogroup * Add aria-labelledBy to radio button groups * Add reorganization notice (#1610) * Add aria attributes to password gen options (#1611) * [EC-143] [BEEEP] Allow linking to ciphers (#1579) Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Fix login sponsorship redirect (#1620) * Contribution Documentation edits (#1599) Making corrections to the mobile contributions doc: Update Crowdin contact from Kyle to dwbit. Update 'User-to-User Support' forum category to 'Ask the Bitwarden Community' * Add description for the A-Z & a-z items (#1615) * Add description for reports message (#1600) Add "Vault Health Reports can be used to evaluate the security of your Bitwarden Personal or Organization Vault" description to the source string, "Identify and close security gaps in your online accounts by clicking the reports below." * [PS-301] Load OssModule from BitwardenLicense (#1626) * Bumped version to 2.28.1 (#1629) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [EC-154] [BEEEP] Remove factory providers in Angular DI (#1609) * use InjectionTokens * Use InitService * PS-79 Updated two-factor component to to align to jslib change to send the deviceId on 2fa email resend code (#1624) * [PS-74] Fix user authentication state checks (#1632) * Update to use new authStatus method * Delete unused services and import * update jslib * [PS-381] Fix locale being empty when not configuring a language (#1631) * Forwarded email providers to username generator (#1628) * forwarded emails * firefox relay * remove firefox relay * update jslib ref * remove dupe logService * Update localization description for 'random' (#1633) Adding description string for 'random' * DEVOPS-758 - Move Web deploy from GitHub Pages to CloudFlare Pages (#1627) * Update jslib * Run npm i after merge with master * Update name of UserVerificationComponent * Fix lazy loading of routing modules * Routing modules should have routing in their name * Revert "Fix lazy loading of routing modules" This reverts commit 59d4e6e06caf54692db8662fb4ed799dc2836dc3. * Do not eagerly load feature modules Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Oscar Hinton <oscar@oscarhinton.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: dwbit <98768076+dwbit@users.noreply.github.com> Co-authored-by: Federico Maccaroni <fedemkr@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com> Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> * Do not render org options menu until loaded (#1638) * [SG-31 End User Vault Refresh] Update cipher options menu (#1593) * Update Vault cipher option menus * Update Send list to use same style * [SG-207] [EUVR] Remove Organizations from Settings page (#1619) * [fix] Cut off overflow text for link buttons (#1639) * [SG-225] Remove BaseGuard (#1641) * [SG-34 End User Vault Refresh] Organization Switcher (#1550) * [euvr] Subscription/Billing updates (#1576) * [euvr] Subscription changes * Revert testing bang * Removed final instance of getUserBilling * Moved to feature/endUserVaultRefresh remote branch and updated to latest * Removed org-billing changes * Updated premium component header * Updated stateservice path * Updated billing component name * Reverting org-billing decouple * Using tailwind classes for CL objects * Added TODO * Removed divider for components within new tab nav * Update jslib/add components to loose-components module * Updated routing lazy load module name to match existing pattern * Fixed bug with redirect // Added button type // Removed headers for tabbed pages * Revert changes to .gitmodules * [dep] Update jslib Co-authored-by: Oscar Hinton <oscar@oscarhinton.com> Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com> Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: dwbit <98768076+dwbit@users.noreply.github.com> Co-authored-by: Federico Maccaroni <fedemkr@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com> Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2022-05-09 14:21:52 +02:00
return NavigationPermissionsService.canAccessManage(this.organization);
}
get showToolsTab(): boolean {
[SG-220] End User Vault Refresh (#1640) * Add premium badge component (#1525) * [Vault Refresh] Nav update and Options -> Preferences (#1530) * Update jslib * [End User Vault Refresh] Security sub-page (#1538) * [End User Vault Refresh] Security section * Updated routing module * Update routing for change-password * Updated buttons of all modified classes // imported button module * Converted modified class to use bit-callout * removed comments * Update small button to current cl button * Update jslib and consequential updates * [End User Vault Refresh] Vault - remove Org and Provider cards (#1529) * Update reports page (#1536) * [End User Vault Refresh] Organizations - updated nav and route permissions (#1551) * Add Organizations link to navbar * Update route permissions and guards * Use NavigationPermissionsService to unify route permissions * Rename "My Vault" to "Vaults" (#1569) * [euvr] Adjust Vault width based on card visibility (#1588) * [SG-31 End User Vault Refresh] Account Menu updates (#1596) * Add menuModule * Use bit-menu for account menu * Fix styling, replace CSS with TW * Change out bootstrap styling * Fix styling * Fix styling * Rename My Account to Account Settings * WIP use Avatar for account menu * Revert "WIP use Avatar for account menu" This reverts commit d58bea4874d94d5cdf5a96f7047623b1e0c839b7. * Update jslib from feature branch * [End User Vault Refresh] SG-16: Organization filters (#1595) * [feature] Base implementation of EUVR filter changes * [refactor] Relocated vault-filters to app/modules * [refactor] Reuse vault-filters component for organizations * [refactor] Remove unused org filter component * [bug] .gitmodules branch change * [bug] Load organization filters after sync during login * [refactor] Introduce a SharedModule * [refactor] Created a home for loose components * [refactor] Convert VaultComponent and OrgVaultComponent into a pair of modules * [refactor] Implement <bit-menu> for organization filter actions * [feature] Improve a11y standards of the vault filters module * [bug] Recreate package-lock.json * Fix build issue * [bug] Remove duplicate this.go() call * [fix] Use correct filter-buttons class Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Hinton <oscar@oscarhinton.com> * [SG-32] Add Ownership badge to vault items (#1623) * [feature] Base implementation of EUVR filter changes * [refactor] Relocated vault-filters to app/modules * [refactor] Reuse vault-filters component for organizations * [refactor] Remove unused org filter component * [bug] .gitmodules branch change * [bug] Load organization filters after sync during login * [refactor] Introduce a SharedModule * [refactor] Created a home for loose components * [refactor] Convert VaultComponent and OrgVaultComponent into a pair of modules * [refactor] Implement <bit-menu> for organization filter actions * [feature] Improve a11y standards of the vault filters module * [bug] Recreate package-lock.json * Fix build issue * [bug] Remove duplicate this.go() call * Add organization owner badge to vault items * Fix capitalization * Re-organize new components into modules * Use tailwind css class Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Hinton <oscar@oscarhinton.com> * [EUVR] Merge master into feature branch (#1637) * Update jslib (#1602) * Update jslib * Update name of UserVerificationComponent * Bumped version to 2.28.0 (#1603) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [EC-161] Bump braintree (#1606) * [PS-211] [PS-212] Make Generator page accessible (#1607) * Fix grouping of radiobutton inputs * Add role=radiogroup * Add aria-labelledBy to radio button groups * Add reorganization notice (#1610) * Add aria attributes to password gen options (#1611) * [EC-143] [BEEEP] Allow linking to ciphers (#1579) Co-authored-by: Matt Gibson <mgibson@bitwarden.com> * Fix login sponsorship redirect (#1620) * Contribution Documentation edits (#1599) Making corrections to the mobile contributions doc: Update Crowdin contact from Kyle to dwbit. Update 'User-to-User Support' forum category to 'Ask the Bitwarden Community' * Add description for the A-Z & a-z items (#1615) * Add description for reports message (#1600) Add "Vault Health Reports can be used to evaluate the security of your Bitwarden Personal or Organization Vault" description to the source string, "Identify and close security gaps in your online accounts by clicking the reports below." * [PS-301] Load OssModule from BitwardenLicense (#1626) * Bumped version to 2.28.1 (#1629) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [EC-154] [BEEEP] Remove factory providers in Angular DI (#1609) * use InjectionTokens * Use InitService * PS-79 Updated two-factor component to to align to jslib change to send the deviceId on 2fa email resend code (#1624) * [PS-74] Fix user authentication state checks (#1632) * Update to use new authStatus method * Delete unused services and import * update jslib * [PS-381] Fix locale being empty when not configuring a language (#1631) * Forwarded email providers to username generator (#1628) * forwarded emails * firefox relay * remove firefox relay * update jslib ref * remove dupe logService * Update localization description for 'random' (#1633) Adding description string for 'random' * DEVOPS-758 - Move Web deploy from GitHub Pages to CloudFlare Pages (#1627) * Update jslib * Run npm i after merge with master * Update name of UserVerificationComponent * Fix lazy loading of routing modules * Routing modules should have routing in their name * Revert "Fix lazy loading of routing modules" This reverts commit 59d4e6e06caf54692db8662fb4ed799dc2836dc3. * Do not eagerly load feature modules Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Oscar Hinton <oscar@oscarhinton.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: dwbit <98768076+dwbit@users.noreply.github.com> Co-authored-by: Federico Maccaroni <fedemkr@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com> Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> * Do not render org options menu until loaded (#1638) * [SG-31 End User Vault Refresh] Update cipher options menu (#1593) * Update Vault cipher option menus * Update Send list to use same style * [SG-207] [EUVR] Remove Organizations from Settings page (#1619) * [fix] Cut off overflow text for link buttons (#1639) * [SG-225] Remove BaseGuard (#1641) * [SG-34 End User Vault Refresh] Organization Switcher (#1550) * [euvr] Subscription/Billing updates (#1576) * [euvr] Subscription changes * Revert testing bang * Removed final instance of getUserBilling * Moved to feature/endUserVaultRefresh remote branch and updated to latest * Removed org-billing changes * Updated premium component header * Updated stateservice path * Updated billing component name * Reverting org-billing decouple * Using tailwind classes for CL objects * Added TODO * Removed divider for components within new tab nav * Update jslib/add components to loose-components module * Updated routing lazy load module name to match existing pattern * Fixed bug with redirect // Added button type // Removed headers for tabbed pages * Revert changes to .gitmodules * [dep] Update jslib Co-authored-by: Oscar Hinton <oscar@oscarhinton.com> Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com> Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> Co-authored-by: Matt Gibson <mgibson@bitwarden.com> Co-authored-by: dwbit <98768076+dwbit@users.noreply.github.com> Co-authored-by: Federico Maccaroni <fedemkr@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com> Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2022-05-09 14:21:52 +02:00
return NavigationPermissionsService.canAccessTools(this.organization);
}
get showSettingsTab(): boolean {
return NavigationPermissionsService.canAccessSettings(this.organization);
}
get toolsRoute(): string {
return this.organization.canAccessImportExport
? "tools/import"
: "tools/exposed-passwords-report";
}
get manageRoute(): string {
let route: string;
switch (true) {
case this.organization.canManageUsers:
route = "manage/people";
break;
case this.organization.canViewAssignedCollections || this.organization.canViewAllCollections:
route = "manage/collections";
break;
case this.organization.canManageGroups:
route = "manage/groups";
break;
case this.organization.canManagePolicies:
route = "manage/policies";
break;
case this.organization.canManageSso:
route = "manage/sso";
break;
case this.organization.canAccessEventLogs:
route = "manage/events";
break;
}
return route;
2021-12-17 15:57:11 +01:00
}
2018-07-03 21:11:58 +02:00
}