mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
use current frame scope for permission filter function calls
(cherry picked from commit 53febdea819adf58b20a0141e1a1131658f1338c)
This commit is contained in:
parent
967616d88e
commit
14cb6ec741
@ -173,7 +173,7 @@ void FilterUtility::CheckPermission(const ApiUser::Ptr& user, const String& perm
|
||||
|
||||
if (filter && permissionFilter) {
|
||||
std::vector<std::unique_ptr<Expression> > args;
|
||||
args.emplace_back(new GetScopeExpression(ScopeLocal));
|
||||
args.emplace_back(new GetScopeExpression(ScopeThis));
|
||||
std::unique_ptr<Expression> indexer{new IndexerExpression(std::unique_ptr<Expression>(MakeLiteral(filter)), std::unique_ptr<Expression>(MakeLiteral("call")))};
|
||||
FunctionCallExpression *fexpr = new FunctionCallExpression(std::move(indexer), std::move(args));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user