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