# How to limit visibility of spaces

**URL:** <https://discuss.elastic.co/t/how-to-limit-visibility-of-spaces/200468>\
**Category:** Kibana\
**Created:** [September 20, 2019, 5:20pm UTC](https://discuss.elastic.co/t/how-to-limit-visibility-of-spaces/200468 "2019-09-20T17:20:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![salomaoAndrade](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@salomaoAndrade](https://discuss.elastic.co/u/salomaoAndrade)\
**Post date:** [September 20, 2019, 5:20pm UTC](https://discuss.elastic.co/t/how-to-limit-visibility-of-spaces/200468/1 "2019-09-20T17:20:34Z")

</div>

Is there a way to restrict a user from viewing some spaces? I know i can set them to read only, but for what i want i would need to have users only seeing the spaces they can use, is that possible?

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [September 20, 2019, 6:30pm UTC](https://discuss.elastic.co/t/how-to-limit-visibility-of-spaces/200468/2 "2019-09-20T18:30:01Z")

</div>

This can be accomplished with [Space Privileges](https://www.elastic.co/guide/en/kibana/current/kibana-role-management.html#adding_kibana_privileges). Any user of a role that does not have a specific Space assigned to them will not see that Space.

---

<div class="post-metadata">

**Author:** ![salomaoAndrade](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@salomaoAndrade](https://discuss.elastic.co/u/salomaoAndrade)\
**Post date:** [September 20, 2019, 6:44pm UTC](https://discuss.elastic.co/t/how-to-limit-visibility-of-spaces/200468/3 "2019-09-20T18:44:43Z")

</div>

I tried only setting only one space to a user, but he can still see the other spaces, just not their content.

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [September 23, 2019, 12:30pm UTC](https://discuss.elastic.co/t/how-to-limit-visibility-of-spaces/200468/4 "2019-09-23T12:30:56Z")

</div>

Do you happen to have the `kibana_user` or `kibana_dashboard_only_user` roles assigned to these users yet? If so, remove them, as they're no longer needed with the custom roles you've created.

---

<div class="post-metadata">

**Author:** ![salomaoAndrade](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@salomaoAndrade](https://discuss.elastic.co/u/salomaoAndrade)\
**Post date:** [September 23, 2019, 12:45pm UTC](https://discuss.elastic.co/t/how-to-limit-visibility-of-spaces/200468/5 "2019-09-23T12:45:05Z")

</div>

I dont, i just have the custom role i created, and even if i dont set a specific space, it still shows up when the user logs in

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [September 23, 2019, 12:53pm UTC](https://discuss.elastic.co/t/how-to-limit-visibility-of-spaces/200468/6 "2019-09-23T12:53:34Z")

</div>

Can you provide the role definition here?

`GET /_security/role/<custom-role-name>` (docs: [https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html))

---

<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:** [October 21, 2019, 12:53pm UTC](https://discuss.elastic.co/t/how-to-limit-visibility-of-spaces/200468/7 "2019-10-21T12:53:44Z")

</div>

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