# Best practice for FE to show/hide links based on permissions

**URL:** <https://community.auth0.com/t/best-practice-for-fe-to-show-hide-links-based-on-permissions/49370>\
**Category:** Get Help\
**Tags:** best-practices\
**Created:** [September 7, 2020, 8:04pm UTC](https://community.auth0.com/t/best-practice-for-fe-to-show-hide-links-based-on-permissions/49370 "2020-09-07T20:04:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![janetsmith2000](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/janetsmith2000/32/23053_2.png) [@janetsmith2000](https://community.auth0.com/u/janetsmith2000)\
**Post date:** [September 7, 2020, 8:04pm UTC](https://community.auth0.com/t/best-practice-for-fe-to-show-hide-links-based-on-permissions/49370/1 "2020-09-07T20:04:24Z")

</div>

What’s the best practice for showing links/button based on permissions?

I have 2 choices:

1. Filter the items at BE, and pass back the json to FE to render. FE has no knowledge about the permission. However, sometime the menu items/button contains links to another FE url, that means BE needs to have knowledge of FE.
2. FE filter the links based on Roles (I can’t retrieve the permissions in FE, only can get Roles). That means user can inspect the roles in Javascript.

What is the general practice for this?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [September 8, 2020, 8:52pm UTC](https://community.auth0.com/t/best-practice-for-fe-to-show-hide-links-based-on-permissions/49370/2 "2020-09-08T20:52:24Z")

</div>

> [@janetsmith2000](#):
>
> FE filter the links based on Roles (I can’t retrieve the permissions in FE, only can get Roles). That means user can inspect the roles in Javascript.

You can add the roles to the token then conditionally render UI based on that. That is typically the guidance for this type of thing.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [September 23, 2020, 8:52pm UTC](https://community.auth0.com/t/best-practice-for-fe-to-show-hide-links-based-on-permissions/49370/3 "2020-09-23T20:52:31Z")

</div>

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