# Button with function in .js file

**URL:** <https://discourse.nodered.org/t/button-with-function-in-js-file/31453>\
**Category:** Developing Nodes\
**Created:** [12 August 2020 01:11 UTC](https://discourse.nodered.org/t/button-with-function-in-js-file/31453 "2020-08-12T01:11:02Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [13 August 2020 13:39 UTC](https://discourse.nodered.org/t/button-with-function-in-js-file/31453/13 "2020-08-13T13:39:05Z")

</div>

> [@nodiaque](#):
>
> How do you know if you need that "auth.needPermission" and what to give it?

Hopefully [this](https://discourse.nodered.org/t/unauthorized-when-accessing-custom-admin-endpoint/20201/4) an [this](https://discourse.nodered.org/t/custom-admin-api-with-authentication/27051/4) might make this a bit clear for you...

---

_[View the full topic](https://discourse.nodered.org/t/button-with-function-in-js-file/31453)._
