Skip to content

[BUG] Permissions not applied correctly / can't list channels with bot user #9895

@der-eismann

Description

@der-eismann

Description:

I currently try to write a small Shell "library" to send messages to Rocket.Chat instead of E-Mails, however I am unable to list all existing channels on the server with a new bot user I created.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.61.0
  • Operating System: Ubuntu 16.04
  • Deployment Method(snap/docker/tar/etc): snap
  • Number of Running Instances: 1

Steps to Reproduce:

  1. Create new user with role bot
  2. Send request to https://<Rocket.Chat Server>/api/v1/channels.list
    (3. Add more permissions)
    (4. Restart snap)

Expected behavior:

Getting a list of all public channels on the server

Actual behavior:

Getting a list of all joined public channels

Further research:

So at first I thought it's a permission issue, so I added permissions for view-other-user-channels and others - but still no success. Next I gave the bot group every permission available, still no success. So I added the bot to the Admin group, still no success. Only after I removed every other group so the bot user was only in the Admin group it would list all available channels.
But this is not acceptable since these are way too much permissions.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions