public interface ViewResolver
Search saved in the
database. The ViewResolver methods pertaining to search records must be implemented in order for runtime
operation of views to work correctly.
See https://github.com/Graylog2/graylog2-server/pull/12280 and
https://github.com/Graylog2/graylog2-server/pull/12287 for more information.| Modifier and Type | Method and Description |
|---|---|
boolean |
canReadView(String viewId,
Predicate<String> permissionTester,
BiPredicate<String,String> entityPermissionsTester)
A method to return whether the current user is authorized to read the current resolved view and its related
objects (such as the backing
Search record). |
Optional<ViewDTO> |
get(String id) |
Set<ViewDTO> |
getBySearchId(String searchId) |
Set<String> |
getSearchIds() |
Set<ViewDTO> getBySearchId(String searchId)
searchId - A search id.ViewDTO for supplied searchId.Set<String> getSearchIds()
SearchesCleanUpJob.boolean canReadView(String viewId, Predicate<String> permissionTester, BiPredicate<String,String> entityPermissionsTester)
Search record).
This method accepts two permissions tester predicates, to allow each implementation to perform any combination
of permission checks needed.viewId - The id of the view.permissionTester - A predicate, which tests a single string permission parameter.
For example, is the user authorized to read a view based on having of a
particular permission?entityPermissionsTester - A bi-predicate which tests two parameters (the permission to test and the id of
the entity). For example, is the user authorized to read a view based on having
a particular permission and/or having access to a particular entity?Copyright © 2012–2022 Graylog, Inc.. All rights reserved.