Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin can't join a guest-user to a channel via API, if he(admin) isn't in that channel #5744

Closed
maxdwit opened this issue Jan 24, 2017 · 1 comment

Comments

@maxdwit
Copy link

maxdwit commented Jan 24, 2017

Rocket.Chat Version: 0.50.0 ( Ubuntu/snapd)
Running Instances: 1
DB Replicaset OpLog: disabled
Node Version: v4.6.2

admin with full rights can't join a user to a channel via API, if he (the admin) isn't in the channel.

Guest role: create-d / view-I-room ( nothing else)
Steps:

  1. login as admin via api/v1/login as admin. Token and userID is used for subsequent steps
  2. create a user via API whilst putting him into the role "guest". verified=yes, joinDefaultChannels=false
  3. Read _id from channel "test" via API channels.list. This is a not protected/private chat.
  4. call channels.invite with userid, channelid
    { "success": false, "error": "Not allowed [error-not-allowed]", "errorType": "error-not-allowed" }
    Second test:
  5. logged in as administrator via api
  6. read _id from channel "test" via API channels.list.
  7. invited user "admin" whos is currently logged in via api to a channel.
  8. This worked.

Expected behaviour: admin can join any user to a channel and/or private channel.

I did not test what would happen if I a new created user is in the group "user", as this is no use case for me.

@MartinSchoeler
Copy link
Contributor

duplicate of #5683

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants