Log a warning for missing API permissions

fixes #4945
This commit is contained in:
Michael Friedrich 2017-02-08 17:05:53 +01:00
parent a19d68abfe
commit 905f208332
1 changed files with 5 additions and 1 deletions

View File

@ -174,9 +174,13 @@ 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)); BOOST_THROW_EXCEPTION(ScriptError("Missing permission: " + requiredPermission));
} }
}
std::vector<Value> FilterUtility::GetFilterTargets(const QueryDescription& qd, const Dictionary::Ptr& query, const ApiUser::Ptr& user, const String& variableName) std::vector<Value> FilterUtility::GetFilterTargets(const QueryDescription& qd, const Dictionary::Ptr& query, const ApiUser::Ptr& user, const String& variableName)
{ {