mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-07 20:25:08 +02:00
use current frame scope for permission filter function calls
This commit is contained in:
parent
759b090f81
commit
53febdea81
@ -157,7 +157,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