hide _tables with permissions

A place for users and developers of the Xataface to discuss and receive support.

Postby 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
cbovio
 
Posts: 25
Joined: Wed Dec 31, 1969 5:00 pm

Postby 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:

http://framework.weblite.ca/documentation/manual/delegate_classes/application-delegate-class/getPreferences-method


And then make your own menu.

-Steve

--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby 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 ?
cbovio
 
Posts: 25
Joined: Wed Dec 31, 1969 5:00 pm

Postby 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']);

}


--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 34 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved