Fix permission check

This commit is contained in:
badaix 2025-05-12 17:50:27 +02:00 committed by Johannes Pohl
parent 0d32b5864b
commit 1a9d0b3516
3 changed files with 5 additions and 3 deletions

View file

@ -331,8 +331,7 @@ void Server::onMessageReceived(const std::shared_ptr<StreamSession>& streamSessi
LOG(ERROR, LOG_TAG) << "Authentication required\n";
error_msg = make_shared<msg::Error>(401, "Unauthorized", ec ? ec.detailed_message() : "Authentication required");
}
if (!streamSession->authinfo.hasPermission("Streaming"))
else if (!streamSession->authinfo.hasPermission("Streaming"))
{
std::string error = "Permission 'Streaming' missing";
LOG(ERROR, LOG_TAG) << error << "\n";