# Role based menu navigation

**URL:** <https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097>\
**Category:** Ignition Exchange\
**Tags:** perspective\
**Created:** [August 17, 2022, 2:35pm UTC](https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097 "2022-08-17T14:35:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simen](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Simen](https://forum.inductiveautomation.com/u/Simen)\
**Post date:** [August 17, 2022, 2:35pm UTC](https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097/1 "2022-08-17T14:35:48Z")

</div>

I found the resource called Role Based Menu Navigation on the exchange page.  
Tried this resource on a project and I just wanted to say that this is a great addition! 🙂  
It only has 34 downloads, so I figured I could give it some love in the forum to show my appreciation.

The way it works is that administrators can configure the menu tree from a session.  
Based on the roles of the logged in user, they will only see pages they have access to.

Edit: link added  
[https://inductiveautomation.com/exchange/2281/overview](https://inductiveautomation.com/exchange/2281/overview)

There are a small error in the documentation under:  
“The tag is currently stored int he root directory. If you wish to change the location of the tag used in the project be sure to modify the path in the following scripts listed below:”  
In view Exchange \> Role Based Menu \> Templates \> Menu Items \> Submit Button on the onClick Script on lines 19 and 29.  
**It is line 20 and 33**

In view Exchange \> Role Based Menu \> Popup \> Add Edit Item \> Button Container \> Submit onClick Script on lines 23 and 70.  
**It is line 62 and 116**

 ![Role based menu](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/8/b8f88709210f431182fbfe0e56755a806d5779fe.png)

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [August 17, 2022, 4:35pm UTC](https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097/2 "2022-08-17T16:35:44Z")

</div>

I found it great also.  
I've also proposed to the creator to change the target selection by a droplist that will be automatically filled with the page created inside the ignition project instead of typing the target url.

---

<div class="post-metadata">

**Author:** ![mjaved](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mjaved/32/23756_2.png) [@mjaved](https://forum.inductiveautomation.com/u/mjaved)\
**Post date:** [August 17, 2022, 6:21pm UTC](https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097/3 "2022-08-17T18:21:09Z")

</div>

Hi Thanks for catching this. I’ll take a look and get it fixed soon.

---

<div class="post-metadata">

**Author:** ![mjaved](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mjaved/32/23756_2.png) [@mjaved](https://forum.inductiveautomation.com/u/mjaved)\
**Post date:** [August 17, 2022, 6:22pm UTC](https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097/4 "2022-08-17T18:22:12Z")

</div>

I have a version 2 planned with this suggestion and other minor changes

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [August 17, 2022, 7:30pm UTC](https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097/5 "2022-08-17T19:30:21Z")

</div>

like I said in my email, I've a working sample so if you need don't hesitate.

---

<div class="post-metadata">

**Author:** ![Dilan](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dilan](https://forum.inductiveautomation.com/u/Dilan)\
**Post date:** [February 8, 2023, 7:57am UTC](https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097/6 "2023-02-08T07:57:22Z")

</div>

Hi I just tested this and its great, I would however like to change the user source to a database driven one, but can't seem to get this right.

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [February 8, 2023, 1:32pm UTC](https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097/7 "2023-02-08T13:32:48Z")

</div>

hi @Dilan  
i think @mjaved is not working at IA anymore,  
So i will try to help you as best as i can  
Under the Add Edit Item view you should change the following by the name of your user source

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/2/a2a96f6543bc3f2f62819d732eef05f690961c80.png)

then change in the project properties the default user source to the one you create to point at your database.

and you should go to go.  
I've not tested like that but i don't see anywhere else the user source is needed.

regards

---

<div class="post-metadata">

**Author:** ![Dilan](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dilan](https://forum.inductiveautomation.com/u/Dilan)\
**Post date:** [February 9, 2023, 3:17pm UTC](https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097/8 "2023-02-09T15:17:11Z")

</div>

Hello @Arnaud_Declerck thank you so much! This worked like a treat. I had changed the user source in the project properties, but did miss what you found.

---

<div class="post-metadata">

**Author:** ![louagejasper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/louagejasper/32/86311_2.png) [@louagejasper](https://forum.inductiveautomation.com/u/louagejasper)\
**Post date:** [February 15, 2023, 11:24am UTC](https://forum.inductiveautomation.com/t/role-based-menu-navigation/63097/9 "2023-02-15T11:24:02Z")

</div>

Great resource! Thanks for shouting it out, it saved me allot of time.
