How can we have auto-suggestions and options to show in filters for say Program Names - with account_id restriction on the documents the user can see.
Basically my account has all granted fields access but when an account has restriction like this
```
{
"bool": {
"filter": [
{
"match": {
"account_id": "3327"
}
},
{
"match": {
"hide": false
}
}
],
"must_not" : [
{
"match" : {
"ServiceName":"N/A"
}
},
{ "match": {"plunet_site" : "Beyont"} }
]
}
}
```
So how can we have a workaround for this??
Hello @Lakshay_Choube
Welcome to the community!!
Just to be clear can you please confirm if below understanding is correct :
You have user A, user B both have access to same dashboard
When user A logs in the user should see drop-down in kibana dashboard with data 1,2,3
When user B logs in the user should see drop-down in kibana dashboard with data 1,2,3,4,5
If not kindly share an example of what is the scenario you want on kibana dashboard for various accounts (example : user)
Thanks!!
Hi there,
Basically user A should be able to see only their own orders, no one elses.
So there is an account_id filter added in documents query in its user role section as I pasted above - similarly for each other user.
Now when I login with that user in my site and go to see the Kibana Dashboard and try to add filters - when selecting for example Program Name as a filter, it shows a dropdown in each the suggested Program Names should show.
But I think due to the account_id restriction, it fetches nothing. and if I, let’s say, login from a user with no such restrictions, the dropdown does fetch values
With restriction
Without any restrictions - it shows values in dropdown but can’t add 2 image embed
I wanted to know if there was any workaround method, so the autosuggestions and values can still be fetched and shown in the filter in my Kibana Dashboard embed.
Thank you @Lakshay_Choube for the details.
I see that the issue reported by you is at the Dataview level where i also observe the same behavior. With user elastic, the filters can be applied at dataview level but for individual user if we login the filters do not give as auto-complete :
With elastic :
With user user_3327
Workaround :
You create a saved search from the Discover of the fields interested.
put this saved search on the dashboard as shown below, now filter on the ProgramName or any other fields you need :
If you still want to have this autosuggestion at discover level you might need to create seperate indexes as per account & create roles without query filter but this might not be feasible as it will increase count of indices/role.
Thanks!!
Hi @Tortoise
Thanks for the workaround suggestion - this might be a good solution.
Can you tell me more about it? How I can achieve it?
Or maybe point to the docs I can refer for the same?
Thanks again
1 Like
Hello @Lakshay_Choube
you already have a dataview . now create a saved search from the dataview :
Using below option :
now you have dataview & saved search…
Go to dashboard and create using this information, add save serarch , add drop down :
Post this see if it works for individual users.
Thanks!!