dashboard permissions

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

dashboard permissions

Postby samhans » Sun Mar 18, 2012 10:31 am

hai Steve and all friends ,
my problem is now in dashboard permissions. i have made a dashboard as given in the wiki . but when i set the permissions of the dashboard to admin , still.then every body could see the dashboard.

help me, i want that peoples must log in before they can see the dashboard.
samhans
 
Posts: 96
Joined: Fri Feb 10, 2012 1:22 am

Re: dashboard permissions

Postby shannah » Mon Mar 19, 2012 2:23 pm

How are you setting the permissions to admin?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: dashboard permissions

Postby samhans » Tue Mar 20, 2012 7:33 am

i have set permissions=edit in action.ini file in my table folder.
samhans
 
Posts: 96
Joined: Fri Feb 10, 2012 1:22 am

Re: dashboard permissions

Postby shannah » Tue Mar 20, 2012 12:47 pm

1. Should be actions.ini not action.ini
2. Setting permission=edit in an action definition is only half your solution. That says that the user can only see this action if they have the xyz permission granted in the current context. If the user can access the action still, that means that they are granted the xyz permission in the given context.
3. Best to place the actions.ini in the root directory. Consider that unless you have otherwise limited it, your action could be used with any table or any context. I.e. If you only want your action to work for one table, check inside the action to make sure that that table is currently selected and throw an exception if it is not.
e.g.
Code: Select all
$app = Dataface_Application::getInstance();
$query = $app->getQuery();
if ( $query['-table'] != 'mytable' ) throw new Exception("This action is only for use in the mytable table.");


-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: Google [Bot] and 24 guests

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