Skip to content

Commit

Permalink
fix: Regression from canView() refactoring
Browse files Browse the repository at this point in the history
Either the query must be valid, and in case a key is provided, the entry must be readable.
  • Loading branch information
phorward committed Dec 31, 2024
1 parent e3e5a37 commit d0ce5f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/viur/core/prototypes/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def canView(self, skel: SkeletonInstance) -> bool:

query = self.listFilter(query) # Access control

if query is None or not query.getEntry():
if query is None or (key and not query.getEntry()):
return False

return True
Expand Down
2 changes: 1 addition & 1 deletion src/viur/core/prototypes/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def canView(self, skelType: SkelType, skel: SkeletonInstance) -> bool:

query = self.listFilter(query) # Access control

if query is None or not query.getEntry():
if query is None or (key and not query.getEntry()):
return False

return True
Expand Down

0 comments on commit d0ce5f2

Please sign in to comment.