mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.28k stars 1.11k forks source link

Hide Channel for Groups #3057

Open Oswell1993 opened 7 years ago

Oswell1993 commented 7 years ago

Is it possible to implement a feature to hide channels for usergroups? Like a channel there is only visible if you are in the group "moderator"?

Thank you :)

ThomasAH commented 4 years ago

Thanks for adding this to the list of Feature Requests.

I would like to see it implemented as: Users can only see channels they are allowed to enter. (or optionally add an ACL for who can see a channel, which would offer the same functionality)

ghost commented 3 years ago

Thanks for adding this to the list of Feature Requests.

I would like to see it implemented as: Users can only see channels they are allowed to enter. (or optionally add an ACL for who can see a channel, which would offer the same functionality)

I can actually see a better use for an ACL of who can see a channel - Being able to show that, for example, admins are busy talking in the admin channel and will probably be back in shortly would be useful.

Also - How the user count reflects this should be considered. If you can see that there are 6 users in the server, and 3 users in a channel, but no users in any visible channel, it tips you off that there are hidden channels and what they're nested under.

That said, I'd love this feature for sure.

wpbirney commented 8 months ago

Any update on this? Would be a super helpful feature

Krzmbrzl commented 8 months ago

No

Bubbleioa commented 5 months ago

I wrote a implementation with a few lines of code for my server to hide some groups. User who at least has one kind of premission can see the groups.

#include "ACL.h"
#include "murmur/ServerUser.h"
#include "murmur/Server.h"

void Connection::sendMessage(const ::google::protobuf::Message &msg, Mumble::Protocol::TCPMessageType msgType,
                             QByteArray &cache) {
#ifdef MURMUR
    if (msgType == Mumble::Protocol::TCPMessageType::ChannelState) {
        const auto& usr = static_cast<ServerUser*>(this);
        const auto& chan = reinterpret_cast<const MumbleProto::ChannelState&>(msg);
        const auto& server = static_cast<Server*>(this->parent());
        if (!ChanACL::hasPermission(usr, server->qhChannels[chan.channel_id()], ChanACL::All, nullptr)) {
            return;
        }
    }
#endif
    if (cache.isEmpty()) {
        messageToNetwork(msg, msgType, cache);
    }

    sendMessage(cache);
}

But you need traverse or write premission, otherwise you can not get any premission.

// ACL.cpp
if (!traverse && !write) {
    granted = None;
    break;
}

Since no one actually left the server, all the users in hidden groups are shown in Root. If your server has very few users, this method of hiding channels is not very helpful.

In fact, this feature on a technical level is rather challenging to implement with ACL. Our users would be able to know the number of people on the server before they even enter it, which happens before ACL authentication. Not to mention, we have other protocols that can communicate with the mumble-server. For servers with a small number of users, you can launch several mumble-server for each member user to achieve true isolation of the groups. For servers with a large number of users and multiple groups, I believe the implementation above is quite good. The Root channel acts as a "live" status, as most people are there.

Achieving this with user status would be beneficial, as we could introduce an additional "Invisible" status. This means that the server would not register Invisible users in any way (which could cause a problem, as the channel could be at capacity, even if there are not yet enough users logged in), and it would only broadcast the information about Invisible users to those who are currently in the same channel.