# HG changeset patch # User Alain Mazy # Date 1687266986 -7200 # Node ID fcc4542a0c389b8ddbc719a4631586993eb4a4ca # Parent 18d3f7bd18db291e19fc50d32bb9ca85fa8865cb cleanup diff -r 18d3f7bd18db -r fcc4542a0c38 Plugin/Plugin.cpp --- a/Plugin/Plugin.cpp Tue Jun 20 09:22:41 2023 +0200 +++ b/Plugin/Plugin.cpp Tue Jun 20 15:16:26 2023 +0200 @@ -147,30 +147,33 @@ { if (authTokens.empty()) { - LOG(INFO) << "Testing whether anonymous user has any of the required permissions '" << JoinStrings(requiredPermissions) << "'"; + std::string msg = std::string("Testing whether anonymous user has any of the required permissions '") + JoinStrings(requiredPermissions) + "'"; + LOG(INFO) << msg; if (authorizationService_->HasAnonymousUserPermission(validity, requiredPermissions)) { - LOG(INFO) << "Testing whether anonymous user has any of the required permissions '" << JoinStrings(requiredPermissions) << "' -> granted"; + LOG(INFO) << msg << " -> granted"; return 1; } else { - LOG(INFO) << "Testing whether anonymous user has any of the required permissions '" << JoinStrings(requiredPermissions) << "' -> not granted"; + LOG(INFO) << msg << " -> not granted"; } } else { for (size_t i = 0; i < authTokens.size(); ++i) { - LOG(INFO) << "Testing whether user has the required permission '" << JoinStrings(requiredPermissions) << "' based on the '" << authTokens[i].GetToken().GetKey() << "' HTTP header required to match '" << matchedPattern << "'"; + std::string msg = std::string("Testing whether user has the required permissions '") + JoinStrings(requiredPermissions) + "' based on the HTTP header '" + authTokens[i].GetToken().GetKey() + "' required to match '" + matchedPattern + "'"; + + LOG(INFO) << msg; if (authorizationService_->HasUserPermission(validity, requiredPermissions, authTokens[i].GetToken(), authTokens[i].GetValue())) { - LOG(INFO) << "Testing whether user has the required permission '" << JoinStrings(requiredPermissions) << "' based on the '" << authTokens[i].GetToken().GetKey() << "' HTTP header required to match '" << matchedPattern << "' -> granted"; + LOG(INFO) << msg << " -> granted"; return 1; } else { - LOG(INFO) << "Testing whether user has the required permission '" << JoinStrings(requiredPermissions) << "' based on the '" << authTokens[i].GetToken().GetKey() << "' HTTP header required to match '" << matchedPattern << "' -> not granted"; + LOG(INFO) << msg << " -> not granted"; } } }