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.
+1
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
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.
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