You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HIGH: [Reliability] "Auth DeletePolicy" error occurs when deleting a workspace connected to a room #20860
Go to Settings > Workspaces and create a new workspace
Invite user2 to join the newly created workspace
Log in to user2 account
Navigate to the New Room section
Create a room and select workspace created by user1 and select room's visibility to public
Switch back to user1 account
Attempt to delete the workspace
Expected Result:
Auth error should not appear while deleting workspace
Actual Result:
"Auth DeletePolicy" error occurs when deleting a workspace connected to a room
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.28-3 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
changed the title [-] "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/-][+][$1000] "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/+]on Jun 16, 2023
Please re-state the problem that we are trying to solve in this issue.
"Auth DeletePolicy" error occurs when deleting a workspace connected to a room
What is the root cause of that problem?
When the visibility is set to private or public then, policyOwner is not added as a room participant. When we choose Restricted visibility, all workspace members are included.
This will cause room not found when we perform DeleteWorkspace API request.
What changes do you think we should make in order to solve the problem?
Ideally, if we execute DeleteWorkspace API by the policyOwner, it should find the room id even if the policy owner is not added to the room as a participant. So we should modify DeleteWorkspace API to be able to find all of the owned room ids.
What alternative solutions did you explore? (Optional)
We can add all members to the room for all of the visibility types like what we did for the Restrict visibility type, or at least we can add the policy owner to the new room as a participant.
We should also modify the backend for this option, and then add ownerAccountID to participants for optimistic report creation.
function addPolicyReport(policy, reportName, visibility) {
const ownerAccountID = PersonalDetailsUtils.getAccountIDsByLogins([policy.owner])[0];
// The participants include the current user (admin) and the employees. Participants must not be empty.
const participants = _.unique([ownerAccountID, currentUserAccountID, ..._.pluck(policy.employeeList, 'accountID')]);
Or we can also pass the participants from the API call.
changed the title [-] "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/-][+]HIGH: "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/+]on Feb 25, 2024
changed the title [-]HIGH: "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/-][+]HIGH: [Reliability] "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/+]on Mar 25, 2024
Just retested this, and it's working now! If you create a public room on a workspace and then delete the workspace, you can now successfully delete it, and the public room is just archived.
@joekaufmanexpensify could you please check, this bug was reported Jun 16, 2023 before closing the bug reporting, so I'm eligible for bug reporting right?
Activity
melvin-bot commentedon Jun 15, 2023
Triggered auto assignment to @joekaufmanexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jun 15, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)joekaufmanexpensify commentedon Jun 16, 2023
Reproduced. I also noted this doesn't happen with other room types (like restricted).
[-] "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/-][+][$1000] "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/+]melvin-bot commentedon Jun 16, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01e90bc248e9218d8a
melvin-bot commentedon Jun 16, 2023
Current assignee @joekaufmanexpensify is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jun 16, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (
External)wildan-m commentedon Jun 17, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Auth DeletePolicy" error occurs when deleting a workspace connected to a room
What is the root cause of that problem?
When the visibility is set to
privateorpublicthen,policyOwneris not added as a room participant. When we chooseRestrictedvisibility, all workspace members are included.This will cause room not found when we perform
DeleteWorkspaceAPI request.What changes do you think we should make in order to solve the problem?
Ideally, if we execute
DeleteWorkspaceAPI by thepolicyOwner, it should find the room id even if the policy owner is not added to the room as a participant. So we should modifyDeleteWorkspaceAPI to be able to find all of the owned room ids.What alternative solutions did you explore? (Optional)
We can add all members to the room for all of the visibility types like what we did for the
Restrictvisibility type, or at least we can add the policy owner to the new room as a participant.We should also modify the backend for this option, and then add
ownerAccountIDto participants for optimistic report creation.From this:
App/src/libs/actions/Report.js
Lines 1156 to 1159 in 83ab016
To this:
Or we can also pass the participants from the API call.
134 remaining items
quinthar commentedon Feb 25, 2024
Escalating to HIGH so we can get more discussion on this.
[-] "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/-][+]HIGH: "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/+]quinthar commentedon Feb 25, 2024
Asking more about it here: https://expensify.slack.com/archives/C03U7DCU4/p1708850855478309
joekaufmanexpensify commentedon Mar 4, 2024
Great. TY!
joekaufmanexpensify commentedon Mar 22, 2024
Going to work on seeing if this issue is reproducible!
[-]HIGH: "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/-][+]HIGH: [Reliability] "Auth DeletePolicy" error occurs when deleting a workspace connected to a room[/+]joekaufmanexpensify commentedon Mar 25, 2024
Just retested this, and it's working now! If you create a public room on a workspace and then delete the workspace, you can now successfully delete it, and the public room is just archived.
joekaufmanexpensify commentedon Mar 25, 2024
Closing as the reported bug is no longer occurring!
ayazhussain79 commentedon Mar 26, 2024
@joekaufmanexpensify could you please check, this bug was reported Jun 16, 2023 before closing the bug reporting, so I'm eligible for bug reporting right?
joekaufmanexpensify commentedon Mar 26, 2024
No, I don't think so. We didn't fix anything in this issue.
ayazhussain79 commentedon Mar 26, 2024
Ok Thank you