RocketChat / RocketChat/Rocket.Chat

getUsersInRole, parameter roomId not filter results

Open
#23,324 4 comments 3 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:

While calling api rest route getUsersInRole, parameter roomId not filter results
Searching in code, in app/authorization/server/functions/getUsersInRole.js, scope is propagated
passing into app/models/server/models/Roles.js scope is propagated
But in app/models/client/models/Users.js scope is passed to method but never used

This will prevent us to retrieve userXroles by room which is required in our moodle plugin development

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

Trace the roomId scope from app/authorization/server/functions/getUsersInRole.js through app/models/server/models/Roles.js into app/models/client/models/Users.js. Confirm where the scope is accepted but unused, then verify that the getUsersInRole route returns only users associated with the requested room.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, authorization, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.