diff --git a/lib/remote/filterutility.cpp b/lib/remote/filterutility.cpp index 90f4d14f2..aa1743698 100644 --- a/lib/remote/filterutility.cpp +++ b/lib/remote/filterutility.cpp @@ -174,8 +174,12 @@ void FilterUtility::CheckPermission(const ApiUser::Ptr& user, const String& perm } } - if (!foundPermission) + if (!foundPermission) { + Log(LogWarning, "FilterUtility") + << "Missing permission: " << requiredPermission; + BOOST_THROW_EXCEPTION(ScriptError("Missing permission: " + requiredPermission)); + } } std::vector FilterUtility::GetFilterTargets(const QueryDescription& qd, const Dictionary::Ptr& query, const ApiUser::Ptr& user, const String& variableName)