RocketChat / RocketChat/Rocket.Chat

REST API endpoint groups.roles does not work for global admins

Open
#22,148 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description:

When trying to get all roles of a group (= private channel/room) via providing either roomId or roomName it is always stated that there is no match for the given parameter. even when for the exact same parameters a result ist found when using groups.info endpoint. the user used to call the function is an global admin. it only works if that is user s member of the group

Steps to reproduce:
  1. REST login with admin user
  2. REST call endpoint groups.roles, using an existing groupName with param groupName (or for id vise versa)
Expected behavior:

get a list of roles for the given group

Actual behavior:

error stating that no group is found

Server Setup Information:

Server: 1.16.0
Client: 3.5.1
5.4.108-gentoo-x86_64
Mongo Version: 4.0.19
Node-Version: v12.16.1

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 groups.roles REST call after REST login with a global admin, using an existing groupName and roomId, and compare it with groups.info for the same parameters. Done means groups.roles returns the group's roles for a global admin while retaining the existing behavior for group members.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.