简体   繁体   English

公开频道对所有非管理员用户可见,并禁止用户创建频道

[英]Have public channels visible to all non admin users and forbid user from creating channels

How can I have the existing public channels visible to all users ? 如何使所有用户都可以看到现有的公共频道?

How can I forbid users (non admin) from creating channels ? 如何禁止用户(非管理员)创建频道?

Version: 0.49.0 版本:0.49.0

The way I handled this was to create two main channels (Lobby and Announcements) for all of my employees. 我处理此问题的方式是为所有员工创建两个主要渠道(大厅和公告)。

I then used the REST API to add all users to those two channels. 然后,我使用REST API将所有用户添加到这两个通道。 This won't prevent them from leaving the channels, but you could simply call the API every so often to add people back in that left (or new users, if setting the Default channel to True under Rooms in Administration doesn't seem to be working). 这不会阻止他们离开频道,但是您可以如此频繁地调用API,以在左侧添加人员(或新用户,如果在“管理中的房间”下将“默认频道”设置为True似乎不是这样)工作)。

Here's the steps to do this, using curl: 使用curl的步骤如下:

  1. Get your authentication Token and UserId [1] 获取您的身份验证令牌和UserId [1]
  2. Use your Token and Id from step 1 to get the full channel list [2] 使用步骤1中的令牌和ID获取完整的频道列表[2]
  3. Take the desired roomId from step 2 and (as well as using your Token and Id from step 1) use the addAll API [3] to add literally all users to the channel. 从步骤2中获取所需的roomId,并(以及从步骤1中使用您的令牌和ID)使用addAll API [3]将所有用户添加到频道。

For the second one, you can use the Permissions [4] tab under Administration, it is "create-c" for public or "create-p" for private. 对于第二个,您可以使用“管理”下的“权限[4]”选项卡,对于公用是“ create-c”,对于私有是“ create-p”。

I can't post more than two links, so.. 我不能发布两个以上的链接,所以..

[1] httpx://rocket.chat/docs/developer-guides/rest-api/authentication/login [1] httpx://rocket.chat/docs/developer-guides/rest-api/authentication/login

[2] httpx://rocket.chat/docs/developer-guides/rest-api/channels/list [2] httpx://rocket.chat/docs/developer-guides/rest-api/channels/list

[3] https://rocket.chat/docs/developer-guides/rest-api/channels/addall [3] https://rocket.chat/docs/developer-guides/rest-api/channels/addall

[4] https://rocket.chat/docs/administrator-guides/permissions/ [4] https://rocket.chat/docs/administrator-guides/permissions/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM