Skip to content

Commit 04cf854

Browse files
committed
service: permission: add unlisted tag check for can_search
1 parent 407db1f commit 04cf854

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

invenio_vocabularies/services/permissions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
class PermissionPolicy(RecordPermissionPolicy):
1818
"""Permission policy."""
1919

20-
can_search = [SystemProcess(), AnyUser()]
20+
can_search = [
21+
SystemProcess(),
22+
IfTags(["unlisted"], then_=[SystemProcess()], else_=[AnyUser()]),
23+
]
2124
can_read = [
2225
SystemProcess(),
2326
IfTags(["unlisted"], then_=[SystemProcess()], else_=[AnyUser()]),

0 commit comments

Comments
 (0)