# Visibility Expression Buggy

**URL:** <https://forum.inductiveautomation.com/t/visibility-expression-buggy/86683>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 1, 2024, 4:10pm UTC](https://forum.inductiveautomation.com/t/visibility-expression-buggy/86683 "2024-03-01T16:10:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Perry](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Michael\_Perry](https://forum.inductiveautomation.com/u/Michael_Perry)\
**Post date:** [March 1, 2024, 4:10pm UTC](https://forum.inductiveautomation.com/t/visibility-expression-buggy/86683/1 "2024-03-01T16:10:46Z")

</div>

Hello,

I am working on a perspective session and have added an Expression to the visibility of a button that requires login under a certain user.

isAuthorized(true, 'Authenticated/Roles/Administrator') ||  
isAuthorized(true, 'Authenticated/Roles/Maintenance')

the issue I am having is that when you open perspective or change page views and not "logged in " the button is visible for a few seconds and will function before disappearing.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 1, 2024, 4:24pm UTC](https://forum.inductiveautomation.com/t/visibility-expression-buggy/86683/2 "2024-03-01T16:24:04Z")

</div>

I would put the expression on the enabled prop instead of visible. Then make sure you save the view with it in the disabled state.

---

<div class="post-metadata">

**Author:** ![Michael\_Perry](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Michael\_Perry](https://forum.inductiveautomation.com/u/Michael_Perry)\
**Post date:** [March 1, 2024, 4:30pm UTC](https://forum.inductiveautomation.com/t/visibility-expression-buggy/86683/3 "2024-03-01T16:30:13Z")

</div>

so this is a template pulled down from a parent I have added that expression to the enable in the parent, but no change.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 1, 2024, 5:44pm UTC](https://forum.inductiveautomation.com/t/visibility-expression-buggy/86683/4 "2024-03-01T17:44:25Z")

</div>

If you still have a local resource in place on the child project it will not use the parent settings. Make sure you remove the child resource/View.

What action are you performing with this button? I think every Action has a Security Settings button which allows you to specify who may perform the action, instead of relying on binding of props - though I do still highly recommend you bind the `enabled` prop so that users can see the button shouldn't work for them.
