# Tab Strip, Tab Security

**URL:** <https://forum.inductiveautomation.com/t/tab-strip-tab-security/3556>\
**Category:** Ignition\
**Created:** [November 4, 2011, 12:31pm UTC](https://forum.inductiveautomation.com/t/tab-strip-tab-security/3556 "2011-11-04T12:31:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jim\_lapratt](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jim\_lapratt](https://forum.inductiveautomation.com/u/jim_lapratt)\
**Post date:** [November 4, 2011, 12:31pm UTC](https://forum.inductiveautomation.com/t/tab-strip-tab-security/3556/1 "2011-11-04T12:31:33Z")

</div>

I would like to see security on individual tabs with in the tab strip and visibility. Then if you have not been granted access to it you don’t see it.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 7, 2011, 4:26pm UTC](https://forum.inductiveautomation.com/t/tab-strip-tab-security/3556/2 "2011-11-07T16:26:09Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [November 7, 2011, 6:46pm UTC](https://forum.inductiveautomation.com/t/tab-strip-tab-security/3556/3 "2011-11-07T18:46:47Z")

</div>

You can do this in code today.

I have created a screen that checks on opening if it’s on a mobile device and then removes (hides) tabs if it is. This could be very easily changed to check user permissions. (I’ll see if I can find it later today)

Of course getting the IA devs to write the code once for us all is much better 😈

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 7, 2011, 8:59pm UTC](https://forum.inductiveautomation.com/t/tab-strip-tab-security/3556/4 "2011-11-07T20:59:45Z")

</div>

Yeah, been workin’ on one today in my spare time-- keyboarding with one hand and a sandwich in the other… 😆 Hope to have something to share in a day or two.

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [November 7, 2011, 11:09pm UTC](https://forum.inductiveautomation.com/t/tab-strip-tab-security/3556/5 "2011-11-07T23:09:21Z")

</div>

Event handler for  
InternalFrameOpen

`if system.util.getSystemFlags() & system.util.MOBILE_FLAG == system.util.MOBILE_FLAG:
    app.header.mobileMenu(event)
`  
app.header.mobileMenu

`#adjust the tabStrip menu for mobiles
def mobileMenu(event):
    import system
    menu = event.source.rootContainer.getComponent('Tab Strip').tabData
    headers = []
    for c in range(menu.columnCount):
        headers.append(menu.getColumnName(c))
    rows = []
    for m in range(menu.rowCount):
        if menu.getValueAt(m,'NAME') != 'NotForMobile1' and menu.getValueAt(m,'NAME') != 'OnlyForBigScreen':
            row = []
            for c in range(menu.columnCount):
                    row.append(menu.getValueAt(m,c))
            rows.append(row)
    event.source.rootContainer.getComponent('Tab Strip').tabData = system.dataset.toDataSet(headers,rows)
`

What this does is grab the entire dataset for the tab strip and then loops through it building a new one. If the row is a tab I don’t want to show I don’t include it in the new dataset.

So change the frame open event to check system.security.getRoles and the name of the tabs you want to not show and your done 🙂
