hide _tables with permissions
Archived from the Xataface Users forum.
cbovio — Mon Apr 23, 2007 6:19 am
hello,
i use permissions with users profiles.
i need to hide some tables tabs with users profiles. how do that ?
thanks
shannah — Mon Apr 23, 2007 8:33 am
Currently you can’t do this.Ê The best way to achieve this sort of thing is to hide the tables menu using preferences:
And then make your own menu.
-Steve
cbovio — Tue Apr 24, 2007 2:33 am
OK thanks.
I see in NavMenu template loop on $ENV.APPLICATION._tables
there are no possibilities to filter this in ApplicationDeleguate.php ?
shannah — Tue Apr 24, 2007 10:40 am
OK.. you probably could filter this in the getPreferences() method.Ê You can access this array using:
$app =& Dataface_Application::getInstance();
$tables =& $app->_conf[‘_tables’];
if (userIsNotAllowedToSeeFooTable()){
ÊÊÊ unset($tables[‘foo’]);
}