RocketChat / RocketChat/Rocket.Chat
getUsersInRole, parameter roomId not filter results
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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