# Perspective/Multistate Button/Permission

**URL:** <https://forum.inductiveautomation.com/t/perspective-multistate-button-permission/27898>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [August 30, 2019, 6:25am UTC](https://forum.inductiveautomation.com/t/perspective-multistate-button-permission/27898 "2019-08-30T06:25:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssatonkar](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@ssatonkar](https://forum.inductiveautomation.com/u/ssatonkar)\
**Post date:** [August 30, 2019, 6:25am UTC](https://forum.inductiveautomation.com/t/perspective-multistate-button-permission/27898/1 "2019-08-30T06:25:37Z")

</div>

HI,  
I have configured a view in perspective in which I have used Multistate button to show status and applied authentication to this object using Configure Event-\> Security Settings-\>Script-\>OnClick Action. However, when the IMultistate button object is clicked with unauthorized login it gives warning "Action Denied" but click event executes and button changes its state.

I am unable to find out the issue with this configuration.

Thanks

---

<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:** [August 30, 2019, 2:09pm UTC](https://forum.inductiveautomation.com/t/perspective-multistate-button-permission/27898/2 "2019-08-30T14:09:55Z")

</div>

`onClick` will always occur whether a user has permissions or not because the click event is not something you can prevent. if you only want an action to be performed when a button is enabled, per se, or a user has the required permissions, then you should use `onActionPerformed`.  
 ![22%20AM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/aab42abc9bbc0a2286f85d9bf170df103996c7e6.png)

---

<div class="post-metadata">

**Author:** ![FrankP](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@FrankP](https://forum.inductiveautomation.com/u/FrankP)\
**Post date:** [October 3, 2019, 2:24pm UTC](https://forum.inductiveautomation.com/t/perspective-multistate-button-permission/27898/3 "2019-10-03T14:24:57Z")

</div>

This is a good point. I just noted that the Inductive University video for “Dock Action” shows using the Mouse Click event for this instead of onActionPerformed. (at about 2:58) This led me to search for this in the forum.

If I recall correctly, it seems the videos often show Mouse Click used on buttons instead of action performed. Obviously this means that if a user utilizes tab stops and keyboard actions to fire the button, the button will not perform expected function. It might be prudent to show best practice for button usage in the videos.

---

<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:** [October 3, 2019, 3:34pm UTC](https://forum.inductiveautomation.com/t/perspective-multistate-button-permission/27898/4 "2019-10-03T15:34:28Z")

</div>

That’s true, and something that will probably be revisited once those videos are remade, but in fairness to the training department, I’m pretty sure buttons _didn’t have_ an `onActionPerformed` method when those videos were made.

---

<div class="post-metadata">

**Author:** ![Michael\_Keller](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_Keller](https://forum.inductiveautomation.com/u/Michael_Keller)\
**Post date:** [November 17, 2022, 8:21pm UTC](https://forum.inductiveautomation.com/t/perspective-multistate-button-permission/27898/5 "2022-11-17T20:21:26Z")

</div>

I have done this with onActionPerformed and the error is coming up but the button is still changing states.

Thank you for any help on this.

---

<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:** [November 17, 2022, 10:12pm UTC](https://forum.inductiveautomation.com/t/perspective-multistate-button-permission/27898/6 "2022-11-17T22:12:16Z")

</div>

The Security Settings described earlier in this thread pertain ONLY to the Script they are attached to. These Security Settings do NOT prevent users from clicking the button - and therefore modifying the associated `controlValue`. If you need to prevent a user from interacting with the Multi-State Button you need to bind `MultiStateButton.props.enabled` against some sort of permission requirement.

---

<div class="post-metadata">

**Author:** ![Michael\_Keller](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_Keller](https://forum.inductiveautomation.com/u/Michael_Keller)\
**Post date:** [November 18, 2022, 12:11am UTC](https://forum.inductiveautomation.com/t/perspective-multistate-button-permission/27898/7 "2022-11-18T00:11:19Z")

</div>

Ok thank you. Sorry for the confusion.
