# Kibana role with time based Index privileges

**URL:** <https://discuss.elastic.co/t/kibana-role-with-time-based-index-privileges/273108>\
**Category:** Kibana\
**Created:** [May 16, 2021, 11:53am UTC](https://discuss.elastic.co/t/kibana-role-with-time-based-index-privileges/273108 "2021-05-16T11:53:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![remrem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/remrem/32/88820_2.png) [@remrem](https://discuss.elastic.co/u/remrem)\
**Post date:** [May 16, 2021, 11:53am UTC](https://discuss.elastic.co/t/kibana-role-with-time-based-index-privileges/273108/1 "2021-05-16T11:53:06Z")

</div>

Hi  
Is there a way to limit a user when he/she can run a query using date math?  
For example user a can only see query result from `now-1d to now`?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [May 17, 2021, 2:03pm UTC](https://discuss.elastic.co/t/kibana-role-with-time-based-index-privileges/273108/2 "2021-05-17T14:03:54Z")

</div>

You can limit the query to a specific interval, but you have to use a defined interval for the Document Level Security settings, so it won't be able to filter "now-1d to now", but you can set it to: "documents newer than May 16th, 2021" using the timestamp.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 14, 2021, 2:04pm UTC](https://discuss.elastic.co/t/kibana-role-with-time-based-index-privileges/273108/3 "2021-06-14T14:04:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
