RocketChat / RocketChat/Rocket.Chat

history's joined channel doesn't show up if you don't have preview permissions

Open
#9,777 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description:

as a new user, with "view-history" permissions but without preview-c-room permissions, you aren't able to see channels history once you join a new channel.
This behavior doesn't happen when you have preview-c-room permissions enabled.
The thing is sometimes you create channels with password but they are visible even if you haven't joined if you enable preview-c-room.

Server Setup Information:
  • Version of Rocket.Chat Server: 0.61.0
  • Operating System: linux ubuntu server x64 4.4.0-111-generic
  • Deployment Method(snap/docker/tar/etc): snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: enable
Steps to Reproduce:
  1. Create a new user, with "view-history" permissions but without preview-c-room permissions
  2. join a new channel that isn't a default channel
  3. you won't be able to see history
Expected behavior:

you should be able to see joined channel's history as your "view history" permission is enabled.

Actual behavior:

you don't see previous conversations in the channel

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 by reproducing the issue with a user who has view-history but lacks preview-c-room, then compare history loading after joining a non-default channel with and without preview-c-room. Trace the permission check involved in loading joined-channel history. Done means joined users can see previous conversations when view-history is enabled, without requiring preview-c-room.

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.