RocketChat / RocketChat/Rocket.Chat

Pop says chat deleted, while chat is actually not deleted, as user doesn't have permission to remove closed chats

Open
#19,470 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Closed omnichannel chats are being not removed/deleted as no one has been assigned permission "Remove Closed Omnichannel Rooms", but pop says chat removed

Steps to reproduce:
  1. Go to permissions
  2. Uncheck all roles for permission "Remove Closed Omnichannel Rooms"
  3. Go to Omnichannel-> Current Chats, click remove on any closed chat
Expected behavior:

Pop up says chat removed, actually chat not removed.

Actual behavior:

Failure pop saying not allowed or something

Server Setup Information:

Version of Rocket.Chat Server: 3.7.1
Operating System: Ubuntu 20.04
Deployment Method: manual install
Number of Running Instances: 1
DB Replicaset Oplog: Enabled
NodeJS Version: v12.14.0
MongoDB Version: 4.0.20

Client Setup Information

Desktop App or Browser Version: Desktop/Chrome 86.0.4240.111
Operating System: Windows7 & Windows 10

Additional context

remove-closed-permission

chat-removed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the Omnichannel Current Chats remove action and the "Remove Closed Omnichannel Rooms" permission described in the reproduction steps. Verify the behavior for a user without that permission, then ensure the popup reports the denied removal and the closed chat remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authorization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.