-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use AggregationStorePermissionExecutor for Aggregation Store Model (#…
…2102) Co-authored-by: Chandrasekar Rajasekar <[email protected]> Co-authored-by: Aaron Klish <[email protected]>
- Loading branch information
1 parent
32856f2
commit 06fbda9
Showing
11 changed files
with
164 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ion/src/test/java/com/yahoo/elide/datastores/aggregation/checks/VideoGameFilterCheck.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2021, Yahoo Inc. | ||
* Licensed under the Apache License, Version 2.0 | ||
* See LICENSE file in project root for terms. | ||
*/ | ||
package com.yahoo.elide.datastores.aggregation.checks; | ||
|
||
import com.yahoo.elide.annotation.SecurityCheck; | ||
import com.yahoo.elide.core.Path; | ||
import com.yahoo.elide.core.filter.expression.FilterExpression; | ||
import com.yahoo.elide.core.filter.predicates.PostfixPredicate; | ||
import com.yahoo.elide.core.security.RequestScope; | ||
import com.yahoo.elide.core.security.checks.FilterExpressionCheck; | ||
import com.yahoo.elide.core.type.Type; | ||
import com.yahoo.elide.datastores.aggregation.example.VideoGame; | ||
|
||
/** | ||
* Filter Expression Check for video game | ||
*/ | ||
@SecurityCheck(VideoGameFilterCheck.NAME_FILTER) | ||
public class VideoGameFilterCheck extends FilterExpressionCheck<VideoGame> { | ||
public static final String NAME_FILTER = "player name filter"; | ||
@Override | ||
public FilterExpression getFilterExpression(Type<?> entityClass, RequestScope requestScope) { | ||
Path path = super.getFieldPath(entityClass, requestScope, "getPlayerName", "playerName"); | ||
return new PostfixPredicate(path, "Doe"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters