mirror of https://github.com/Icinga/icinga2.git
use current frame scope for permission filter function calls
(cherry picked from commit 53febdea81
)
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…
Reference in New Issue