Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-728] CLI Server Config Error Message #8988

Closed
wants to merge 194 commits into from

Conversation

ttalty
Copy link
Contributor

@ttalty ttalty commented Apr 30, 2024

Type of change

- [X] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Fixes #4053

When the logged in user changed server config settings the settings were updated to the user's state. Viewing the server settings would show the set global settings not reflecting the change.

If a user is logged in they should not be allowed to change server config settings. An error message has been added informing the user to logout before updating server config settings.

Code changes

  • apps/cli/src/commands/config.command.ts: Added the account service to the constructor. In the getOrSetServer method added a check to see if the active account exists. If there is an active account the logout error message is displayed.
  • apps/cli/src/program.ts: Account service added to the config commands initialization.

Screenshots

image

Before you submit

  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team
  • Ensure that all UI additions follow WCAG AA requirements

@github-actions github-actions bot added the needs-qa Marks a PR as requiring QA approval label Apr 30, 2024
@ttalty ttalty changed the title Adding error message on server config update when logged in [PM-728] CLI Server Config Error Message Apr 30, 2024
Copy link

codecov bot commented Apr 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 27.73%. Comparing base (76cc0f4) to head (fcafeb6).

Files Patch % Lines
apps/cli/src/platform/config.command.ts 0.00% 5 Missing ⚠️
apps/cli/src/program.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8988      +/-   ##
==========================================
- Coverage   27.74%   27.73%   -0.01%     
==========================================
  Files        2415     2415              
  Lines       69913    69917       +4     
  Branches    12985    12986       +1     
==========================================
  Hits        19394    19394              
- Misses      49020    49024       +4     
  Partials     1499     1499              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Apr 30, 2024

Logo
Checkmarx One – Scan Summary & Details9c06e847-c410-44c8-8ab8-c096ea572493

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Angular_Improper_Type_Pipe_Usage /bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup.component.html: 28 Attack Vector
MEDIUM Angular_Improper_Type_Pipe_Usage /bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup.component.html: 1 Attack Vector

@ttalty ttalty marked this pull request as ready for review May 2, 2024 13:55
@ttalty ttalty requested a review from a team as a code owner May 3, 2024 13:03
@ttalty ttalty requested a review from justindbaur May 3, 2024 13:03
ttalty and others added 18 commits May 6, 2024 10:31
* adds additional logging to TDE service

* remove base catch swallowing errors

* add dependency to cli

* fix comment
* [PM-6827] Add componentRouteSwap util function

* [PM-6827] Add extension-refresh feature flag

* [PM-6827] Add extension-refresh route swap utils

* [PM-6827] Add the TabsV2 component

* [PM-6827] Add the TabsV2 to routing module

* [PM-6827] Fix route prefixes in popup-tab-navigation component
…provided image (#9048)

* Fix the issue of provider admin not seeing the image

* Resolve the  case and ternary operator comment
… mode (#8864)

* suppress welcome window on install when extension is in dev mode

* use platformUtilsService.isDev instead of process.env.ENV

* use devFlags.skipWelcomeOnInstall instead of platformUtilsService.isDev

* update old dev_flags casing in base configs
* test implementation

* move files

* adjust import and sample router comments

* add storybook docs to anon-layout

* rename to AnonLayoutWrapperComponent

* update storybook docs

* remove references to CL and replace with 'Auth-owned'

* move AnonLayoutWrapperComponent to libs

* add pageTitle input

* add subTitle input

* translate page title/subtitle, and refactor how icon is added

* update tailwind.config and component styles

* adjust spacing between primary and secondary content

* move switch statement to wrapper

* move icon to router file

* update storybook documentation

* fix storybook text color in normal code blocks

* remove sample route

* move wrapper component back to web

* remove sample route

* update storybook docs
* added bit toggle group for add access filter to AC collections
* [AC-2555] Fix missing feature flags in CollectionsComponent

* [AC-2555] Do not filter collections when opening the cipher collections dialog in the org vault
* Remove session sync and MemoryStorageService

* Fix merge
* add disableRoutesGraph to compdocArgs

* fix popup-layout story routes
* [AC-1707] Add feature flag

* [AC-1707] Prevent loading ciphers for provider users in the org vault when the feature flag is enabled

* [AC-1707] Ensure new canEditAllCiphers logic only applies to organizations that have FC enabled

* [AC-1707] Update editAllCiphers helper to check for restrictProviderAccess feature flag

* [AC-1707] Remove un-used vaultFilterComponent reference

* [AC-1707] Hide vault filter for providers

* [AC-1707] Add search to vault header for provider users

* [AC-1707] Hide New Item button for Providers when restrict provider access feature flag is enabled

* [AC-1707] Remove leftover debug statement

* [AC-1707] Update canEditAllCiphers references to consider the restrictProviderAccessFlag

* [AC-1707] Fix collections component changes from main

* [AC-1707] Fix some feature flag issues from merge with main

* [AC-1707] Avoid 'readonly' collection dialog for providers

* [AC-1707] Fix broken Browser component

* [AC-1707] Fix broken Desktop component

* [AC-1707] Add restrict provider flag to add access badge logic
MGibson1 and others added 17 commits May 22, 2024 10:56
* PM-2153 Update User Confirm Dialog

* PM-2153 Called confirm user method before dialog close
* [PM-6825] Add style override for app icon in the extension to match desktop

* [PM-6825] Add Ids to favorites and allItems list containers for easier testing automations
* add verify org delete page

* PR feedback from thomas

* use abstraction

* Apply suggestions from code review

Co-authored-by: Rui Tomé <[email protected]>

* delete org copy

* Move verify-recover-delete-org component to admin-console/organizations/manage folder and update routing

* [PM-7004] Add async/await to ngOnInit in verify-recover-delete-org.component.ts

* [PM-7004] Update deleteRecoverOrgConfirmDesc message in messages.json

* [PM-7004] Add warning message for deleting organization's active user accounts

* [PM-7004] Update to standalone component

* [PM-7004] Update delete organization warning message

* [PM-7004] Refactor delete organization form

* [PM-7004] Delete unused selector in verify-recover-delete-org.component.ts

* [PM-7004] Rename recoverDeleteToken method in verify-recover-delete-org.component.ts to deleteUsingToken

* [PM-7004] Update formGroup initialization in verify-recover-delete-org.component.ts

* [PM-7004] Delete formGroup initialization in verify-recover-delete-org.component.ts

* [PM-7004] Remove try/catch from submit method in verify-recover-delete-org.component.ts

* [PM-7004] Update submit button type in verify-recover-delete-org.component.html

* [PM-7004] Remove manual loading state in verify-recover-delete-org.component

* [PM-7004] Remove unnecessary span in verify-recover-delete-org.component.html

* [PM-7004] Update button styles in verify-recover-delete-org.component.html

* [PM-7004] Add back in the manual loading state in verify-recover-delete-org.component

* [PM-7004] Update button type and class in verify-recover-delete-org.component.html

* [PM-7004] Replace bootstrap classes with equivalent tailwind classes

* [PM-7004] Replace bootstrap classes with Tailwind in verify-recover-delete-org.component.html

---------

Co-authored-by: Rui Tomé <[email protected]>
Co-authored-by: Rui Tome <[email protected]>
#9233)

* Move help-and-feedback to tools and rename to about-page

Moved help-and-feedback.component to ..tools
Renamed it to about-page
Changed the title to about
Changed the settings button to about
Updated routes
Updates transition animation

* Move button to open AboutDialog from settings to about-page

* Move launch web-vault to about-page

* Move rate extension from settings to about-page

* Fix no-floating-promises

* Remove icons from about-page entries

* Make about-page standalone

* Create MoreFromBitwardenPage component

Create new component
Add button to navigate to new component from about-page
Add routing for new component

* Add new speedbumps to help-center and web-app links

* Add link to Bitwarden Authenticator page

Include speedbump explaing some functionality about the the authenticator

* Add link to Secrets Manager page

Include speedbump explaining some functionality of Secrets Manager

* Add link to Passwordless.dev page

Include speedbump explaining some functionality of Passwordless.dev

* Move learnFromOrg over to more-from-bitwarden

Include speedbump that explains Bitwarden for business

* Clean-up settings.component

Some left-over clean-up from #8840
- Removing import and export methods

* Move premium-link to more-from-bitwarden

Hide link if user already has premium

* Add popout-button to about-page

* Remove unneeded headings

* Move popout-button on setting to the right

* Add Free Bitwarden Families link

Include speedbump explaining Free Bitwarden Families

---------

Co-authored-by: Daniel James Smith <[email protected]>
…on fixes (#9301)

* [AC-2603] Add unmanaged property to CollectionAdminView and response models

* [AC-2603] Cleanup CollectionViews

- Remove getters that have been replaced with Unmanaged property
- Remove AddAccess that is also being replaced
- Add canEditUnmanagedCollections() helper to organization

* [AC-2603] Replace old AddAccess logic with Unmanaged flag

* [AC-2603] Fix failing test

* [AC-2603] Ensure Add Access badge/toggle only shows when V1 flag is enabled

* [AC-2603] Undo change to canEditUserAccess and canEditGroupAccess

Custom users should not get access to an unmanaged collection with only Manage Groups and Manage User permissions. That is still reserved for admin/owners and EditAnyCollection custom users.
* [PM-8333] Ensure title suffix is aligned with title

* [PM-8333] Add refresh button for autofill list items section for FF sidebar

* [PM-8333] Add button type
* AC-2397 Migrate Reports home component

* AC-2397 Addressed review comments
* AC-2410 Migrate Events Component

* AC-2410 Addressed a minor correction
* PM-2053 Update Bulk Status Dialog

* PM-2053 Upadate bulk status dialog

* PM-2053 Updated type issues in Bulk status dialog
* fix: update observable chains for search, refs AC-2559

* fix: remove comment, reorganize variables, refs AC-2559

* chore: remove ngOnInit from base people component, refs AC-2559

* chore: remove async declaration from resetPaging, refs AC-2559

* chore: replace bit-search ngmodel with formControl, refs AC-2559

* chore: move destroy pattern out of base class, refs AC-2559

* fix: remove ngOnDestroy super call, refs AC-2559

* Improve performance issues

---------

Co-authored-by: Thomas Rittson <[email protected]>
Co-authored-by: Thomas Rittson <[email protected]>
)

* [PM-5295] Improve autofill collection of page details performance

* [PM-5295] Reworking implementation to leverage requestIdleCallback instead of requestAnimationFrame

* [PM-5295] Reworking implementation to leverage requestIdleCallback instead of requestAnimationFrame

* [PM-5295] Incorporating documentation for added methods

* [PM-5295] Reworking how we handle collection of shadowRoot elements

* [PM-5295] Fixing jest tests relating to the defined pseudo selector

* [PM-5295] Fixing jest tests relating to the defined pseudo selector

* [PM-5295] Refactoring

* [PM-5295] Refactoring

* [PM-5295] Refactoring

* [PM-5295] Starting the work to set up the tree walker strategy under a feature flag

* [PM-5295] Incorporating methodology for triggering a fallback to the TreeWalker API if issues arise with the deepQuery approach

* [PM-5295] Fixing jest test
@ttalty ttalty requested review from a team as code owners May 23, 2024 20:11
@ttalty ttalty closed this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-qa Marks a PR as requiring QA approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI config server doesn't return correct server