use current frame scope for permission filter function calls

(cherry picked from commit 53febdea81)
This commit is contained in:
Elias Ohm 2019-05-02 07:35:19 +02:00 committed by Michael Friedrich
parent 967616d88e
commit 14cb6ec741
1 changed files with 1 additions and 1 deletions

View File

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