ACL issue when pre-filtering a list

jfquestiaux

Well-Known Member
I have several ACL groups, all direct children of the "Public" group (Joomla! won't you create a group that has not at least "Public" as parent).

I have one list with published and unpublished records (using a "yesno" element).

I want everybody, "Public" and all ACL groups EXCEPT the "Administration" group, to see only the published records. "Administration" should see all records.

I thought this would work:
WHERE published EQUALS 1 apply to Public
OR published EQUALS 1 apply to Administration (grouped No)
OR published EQUALS 0 apply to Administration (grouped Yes)

but it does not. In fact, as soon as I set the first pre-filter (apply to Public), all the child groups have this pre-filter applied (even SuperAdmin)

Is it the expected behavior? If so, is there another alternative than having a duplicate of the list with a different pre-filter?

This is tested with GitHub 613
 
Your settings should do ( you don't need to repeat EQUALS 1 for admins)
What do you get with fabrikdebug?

If I want to "cancel" a prefilter for admins I usually just add a
OR id >=0 applied to special
 
Well thanks. Your "cancel trick" did the job.

For others struggling with ACL issue on pre-filtering, I think this is the lesson to learn (EXCEPT if this is not the intended behavior - it would be nice to have either Rob or Hugh to confirm) - at least with Joomla 3.1.1 and fabrik 3.1b (not tested with previous J! releases):
If you set a pre-filter on one element (like "published = 1") and apply it to "Public", it is going to be applied to ALL child groups, hence ALL your user groups since they have all "Public" as parent.
So, if you need to "cancel" this pre-filter for a specific group (usually "SuperUser"), you need to use another prefilter set on ANOTHER element. For that matter, Troester's trick works great.

So, for my purpose, if I want to show only the published items to everyone except the "Administration" group, I would use:

WHERE published EQUALS TO 1 no quotes apply to Public
OR WHERE id GREATER OR EQUALS TO 0 no quotes apply to Administration

*** Tested on Fabrik 3.1b - GitHub 613 - Joomla 3.1.1 ***
 
It should do with a prefilter on the same element, too (I've tested with a standard field in 3.1b).

The advantage of 'id GREATER THAN 0' is that it's always true, you don't need to think about which condition or value to choose to "cancel" the prefilter.
 
Which version of Joomla have you tested? I agree it *should* work, but it does not, at least with J! 3.1.1 - maybe Joomla changed something in the way groups work?
 
I tend to re-name 'Public' to Root.

Then set 'Super users' group as a child of Root
Add groups 'Registered' and 'Guest' to the Root.

E.g. This is how fabrik.com's acl groups are set

http://screencast.com/t/D3rAdJVBcs

Then in my view access settings as the groups are no longer hierarchical, you can:

* create a view access level 'front end only' by selecting 'Registered' and 'Guest'.
* Create an 'admin only' view access level by selecting only the 'Super users' group
 
Thanks Rob.
I also tend to work in non-hierarchical way but I did not think about the "Guest" group (it might have been there by default but I deleted the Joomla default groups except Registered and Superuser).
I'll try this solution.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top