# Visibility of object based on user role

**URL:** <https://forum.inductiveautomation.com/t/visibility-of-object-based-on-user-role/14909>\
**Category:** Ignition\
**Created:** [July 27, 2017, 4:39pm UTC](https://forum.inductiveautomation.com/t/visibility-of-object-based-on-user-role/14909 "2017-07-27T16:39:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![p\_hanson](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@p\_hanson](https://forum.inductiveautomation.com/u/p_hanson)\
**Post date:** [July 27, 2017, 4:39pm UTC](https://forum.inductiveautomation.com/t/visibility-of-object-based-on-user-role/14909/1 "2017-07-27T16:39:34Z")

</div>

I’m trying to hide buttons in a navigation tab based on user role (admin). I’ve limited access to use the button on the security tab of the property editor, but I want to hide the visibility of the button all together.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [July 27, 2017, 4:54pm UTC](https://forum.inductiveautomation.com/t/visibility-of-object-based-on-user-role/14909/2 "2017-07-27T16:54:41Z")

</div>

You can bind the visible property of the button to an expression: `hasRole("Administrator")`

---

<div class="post-metadata">

**Author:** ![p\_hanson](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@p\_hanson](https://forum.inductiveautomation.com/u/p_hanson)\
**Post date:** [July 27, 2017, 5:09pm UTC](https://forum.inductiveautomation.com/t/visibility-of-object-based-on-user-role/14909/3 "2017-07-27T17:09:02Z")

</div>

Although this seems straight forward, it does not work. The button is now always gone, regardless of user role.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 27, 2017, 5:28pm UTC](https://forum.inductiveautomation.com/t/visibility-of-object-based-on-user-role/14909/4 "2017-07-27T17:28:35Z")

</div>

Is the role name exactly what it’s defined in your user source? Is the project using the same user source?

Is something from security conflicting with the binding?

[https://docs.inductiveautomation.com/display/DOC79/hasRole](https://docs.inductiveautomation.com/display/DOC79/hasRole)

---

<div class="post-metadata">

**Author:** ![p\_hanson](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@p\_hanson](https://forum.inductiveautomation.com/u/p_hanson)\
**Post date:** [July 27, 2017, 5:39pm UTC](https://forum.inductiveautomation.com/t/visibility-of-object-based-on-user-role/14909/5 "2017-07-27T17:39:09Z")

</div>

It was a clerical error on my part. All is better in my world of Ignition. Thanks for the help.
