Having read now through most of
phpGACL Manual (a recommended reading before posting to this thread! 8)), I've to say that you made a
very good choice for the Joomla ACLs.
Unfortunately, up to 4.5.2,
only ARO groups have been defined in the database (with an easily removable restriction of only one group assigned to each user), with "hardcoded mini-ACOs" outside of phpGACL.
This wrong definition of ACL in 4.5.2 should really be treated as a major bug ;) and improved asap (Joomla! 1.0 ?) to avoid further wrong implementations in 3PD components...especially that it's minimal fix is just a couple of SQL requests to the database...A few very Simplified ACL (Access Control Lists) definition for lambda readers (adapted from the ACL manual, and not replacing its reading):
Quote:
- ARO (Access Request Object) is typically a user
- ARO Group is typically a group of users (a user can be part of multiple groups)
- ACO (Access Control Object) is typically either a type of content or actions to control access onto
- AXO (Access eXtension Objects) are typically an optional additional typing of access (e.g. full site or a given project, etc)
The usage can vary from the above, but what ACL does is basically:
1) define which ARO belong to which ARO Groups
2) define which ARO groups are allowed access to which ACO (for a given AXO if defined)
3) provide a simple function allowing for components to check if a ARO has access to a ACO or ACO/AXO.
Until now most core function and 3PD components check access of the user's ARO group against a defined ARO group level (and sometimes even more wrongly just compare to the ARO group id...), as defined by 4.5.2 (e.g. "Registered, or Author"), and not the ARO itself (user) against a properly defined (by the site admin, default by Joomla or component) ACO and AXO, letting phpGACL find and choose the corresponding ARO group.
It would be damn good to at least define properly a basic set of ACO and simple basic 1-to-1 rules for the existing ARO groups:
existing ARO groups (pro-memo):
Public Frontend
Registered
Author
Editor
Publisher
Public Backend
Manager
Administrator
Super Administrator
Corresponding ACL ACO (Access Control Objects) would be:
Read-Access to public frontend (for Public)
Read-Access to frontend members-only items (for basic Registered users, not including public items)
Edit-Access to frontend (for overall Authors)
Reviewer-Access to frontend (for overall Editors)
Final-Approver-Access to frontend (for overall Publisher)
Public Access of Backend (right now means full access of fronted LOL) -> rename to "Full-Frontend access"?
Read-Access to backend for Managers
Edit-Access to backend for global Administrators only
Access for global Super Administrators only
And maybe one AXO, like: "global site", setting the layers structure...
Then define default access rules like:
Root
|– Public Frontend ( ALLOW [ Read-Access to public frontend ] )
|– Registered ( ALLOW [ Read-Access to frontend members-only items ] )
| |– Author ( ALLOW [ Edit-Access to frontend ] )
| |– Editor ( ALLOW [ Reviewer-Access to frontend], ALLOW [ Edit-Access to frontend ] )
| |– Publisher ( ALLOW [ Final-Approver-Access to frontend ] )
|– Public Access of Backend ( )
|– Manager ( ALLOW [Read-Access to backend for Managers] )
|– Administrator ( ALLOW [Edit-Access to backend for global Administrators only] )
|– Super Administrator ( ALLOW [Access for global Super Administrators only] )
Then, it would really be great to load automatically the ARO id (not the ARO gid) of the logged-in user into the $my global variable to allow components to directly and easily call the phpGACL acl_check() method.
Make a new multi-select-item in mosHTML class (welcome to take the one of CB) and implement a backend ACO and ARO selection item for each component/module, allowing the components/modules to fine-grain their accesses later.
Finally make available as part of mambo.php/joomla.php and document the standard ACL calls.
It's crucial that core/components/modules don't refer to hard-coded ARO groups or admin-set ARO-groups, but to admin (backend) selected ACO&AXO, with proper Joomla-system-default values.
The very minimum would be to define those ACO, AXO and rules, and populate the database with the default values using simple requests (and maybe update the phpGACL library to the latest release).
I would really welcome a phase 0 for ACL, where the ACLs are properly defined, and editable in the backend, so that core-team and 3PD can start implement proper ACL checks.
The above is just a proposal and start of an ACL design proposal for Joomla!, going a little further than the usual "We need ACL" statement. Hope I didn't duplicate someone else's work...
Your feed-backs (after the recommended reading

) and design proposal enhancements/rework are welcome. If this is agreable by the core team, we could then contribute with a submission of a small set of SQL requests and code improvements

.