Skip to content

[HOLD for payment 2024-07-10] [$250] [Simple AA in NewDot] Handling user removed from a Control policy (in NewDot) with Advanced Approval configured #43885

@Beamanator

Description

@Beamanator

Tracking issue: https://github.com/Expensify/Expensify/issues/393839

This issue is the NewDot part of https://github.com/Expensify/Expensify/issues/404210

Action Performed:

  1. Create Control workspace, make sure you can see it in NewDot
    • In OldDot, make sure the Control workspace has "Advanced Approvals" set up (on the workspace settings -> Members tab)
  2. In OldDot, Add at least 2 other members (non-admin)
  3. In OldDot, Set up 1 of the members (Member A) as the submitsTo of the other member (Member B)
  4. In NewDot, as the admin, try to remove Member A from the workspace

Expected Result:

  1. Check if the person being removed exists in the policy's employeeList as an approver (listed as any member's submitsTo, forwardsTo, or overLimitForwardsTo)
    1. If YES, show the user a warning & set some optimistic data before calling DeleteMembersFromWorkspace:
      1. Warning copy should read:

        Remove selected member?

        [Selected member] is an approver in this workspace. When you remove them, we’ll replace them in the approval workflow with the workspace owner, [Workspace Owner].

  2. Optimistically also replace the removed person w/ the workspace owner, anywhere they existed in the policy employeeList as an approver
    3. If NO, proceed as normal with DeleteMembersFromWorkspace

Note: Backend Onyx updates will happen in https://github.com/Expensify/Expensify/issues/404210

Also note: In #43508 we're implementing the ability for non-owner admins to leave workspaces so that doesn't need to be handled in this issue

cc @garrettmknight in case you'd like to be involved in this change

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bf9c32f16606de5d
  • Upwork Job ID: 1802955325447394518
  • Last Price Increase: 2024-06-18
  • Automatic offers:
    • akinwale | Reviewer | 102790397
    • nkdengineer | Contributor | 102790399
Issue OwnerCurrent Issue Owner: @trjExpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions