# How is DLS applied when user has multiple roles

**URL:** <https://forum.opensearch.org/t/how-is-dls-applied-when-user-has-multiple-roles/2946>\
**Category:** Security\
**Created:** [June 1, 2020, 4:44pm UTC](https://forum.opensearch.org/t/how-is-dls-applied-when-user-has-multiple-roles/2946 "2020-06-01T16:44:14Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![rlevitsky](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@rlevitsky](https://forum.opensearch.org/u/rlevitsky)\
**Post date:** [January 3, 2024, 1:34pm UTC](https://forum.opensearch.org/t/how-is-dls-applied-when-user-has-multiple-roles/2946/6 "2024-01-03T13:34:14Z")

</div>

> [@chrousto](#):
>
> {“match\_all” : {} }

Thank you so much chrousto, problem solved!

Addition: in OpenSearch 2.9, this ‘{“match\_all” : {} }’ makes Opensearch Dashboard throw 500 error.

I’ve replaced it with ‘{ “bool”: { “must\_not”: [{ “match\_phrase”: { “host”: “unexisted.name.here” } }] } }’ and it works now.

---

_[View the full topic](https://forum.opensearch.org/t/how-is-dls-applied-when-user-has-multiple-roles/2946)._
