1

Example, I have the action in access.xml:

<action name="com_something.someaction" title="someaction" />

And I want to set it to "Allow for the Public User group" by default.

I there a simple way to do it, without putting the values directly to the database using the installation script?

1

The Controller is the final responsible to check for ACL actions. If you override and implement your own logic, you can disable the check or implement a different control.

For example, a disabled ACL check in a re-implemented JControllerForm allowAdd method:

protected function allowAdd($data = array())
{
    // $user = JFactory::getUser();
    // return ($user->authorise('core.create', $this->option) || count($user->getAuthorisedCategories($this->option, 'core.create')));

    // Everyone can add
    return true;
}
  • all this is right, but it's not the thing that I looking for :) ... I want to use "rule" field, so user can configure access, but I cannot define default value for custom actions, like: Manager = "allow", Registered = "Allow" – Fedik Jun 19 '14 at 14:36
  • In Fof, you can define fof.xml: <view name="object"><acl><task name="browse">core.edit.own</task><task name="batch">core.edit.state</task><task name="process">core.edit.state</task><task name="purge">core.manage</task></acl></view> – Anibal Jun 20 '14 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.