# Role to view both aggregate and user data

**URL:** <https://discuss.elastic.co/t/role-to-view-both-aggregate-and-user-data/115661>\
**Category:** Elasticsearch\
**Created:** [January 16, 2018, 8:18am UTC](https://discuss.elastic.co/t/role-to-view-both-aggregate-and-user-data/115661 "2018-01-16T08:18:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Field](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthew_field/32/26599_2.png) [@Matthew\_Field](https://discuss.elastic.co/u/Matthew_Field)\
**Post date:** [January 16, 2018, 8:18am UTC](https://discuss.elastic.co/t/role-to-view-both-aggregate-and-user-data/115661/1 "2018-01-16T08:18:40Z")

</div>

I have a use case which requires a user to be able to see their own documents and compare with trends in aggregate data of competitors documents.

I can that I can configure X-pack to enable a user to see only their own documents, but I cannot see how i can configure a role to enable them to see aggregate data across all documents without letting them see their individual competitor documents. Is this possible with X-pack?

At present i am in POC stage, so we are free to setup indexes and field structure pretty much the way we want to achieve this objective.

Thanks!

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [January 18, 2018, 9:11pm UTC](https://discuss.elastic.co/t/role-to-view-both-aggregate-and-user-data/115661/2 "2018-01-18T21:11:30Z")

</div>

Unfortunately, this isn't something that is currently supported with X-Pack security.

---

<div class="post-metadata">

**Author:** ![Matthew\_Field](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthew_field/32/26599_2.png) [@Matthew\_Field](https://discuss.elastic.co/u/Matthew_Field)\
**Post date:** [January 19, 2018, 7:54am UTC](https://discuss.elastic.co/t/role-to-view-both-aggregate-and-user-data/115661/3 "2018-01-19T07:54:49Z")

</div>

OK thanks anyway Lukas, I guess we can find a work around maybe creating an  
aggregated data index, but of course that takes away part of the joy of  
elasticsearch!

---

<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:** [February 16, 2018, 7:54am UTC](https://discuss.elastic.co/t/role-to-view-both-aggregate-and-user-data/115661/4 "2018-02-16T07:54:51Z")

</div>

Closed on February 16, 2018, 7:54am UTC

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