use current frame scope for permission filter function calls

This commit is contained in:
Elias Ohm 2019-05-02 07:35:19 +02:00
parent 759b090f81
commit 53febdea81
1 changed files with 1 additions and 1 deletions

View File

@ -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));