mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 09:08:10 +08:00
FEATURE: Allow admins to access group chats (#31440)
In #31366, we added the ability for admins to remove people from group chats. However, that only works as long as the admin is already in the group chat. For forum-side group messages, admins can join any of them at will. This PR extends that same ability to chat for parity.
This commit is contained in:
@ -27,7 +27,7 @@ module Chat
|
||||
end
|
||||
|
||||
def user_can_access?(user)
|
||||
users.include?(user)
|
||||
users.include?(user) || group? && user.admin?
|
||||
end
|
||||
|
||||
def chat_channel_title_for_user(chat_channel, acting_user)
|
||||
|
Reference in New Issue
Block a user