We do know what categories a person has create permission (or any permission) for, that is already indicated in the list of available categories to save to when you create a new article. It's easy enough to retrieve that list. The problem we have is that we are using the backend filters in the front end which means we can't say ... give me everything this user has the right to edit (just like we can't in the back end) and we also can't use OR only AND in the queries (in the back end notice you can't select published or archived ... or articles that are either in the fruit shop category or are public or both. I actually have phase one of some work on reducing this problem in the tracker, which takes care of separating out the archived items which have been bothering put we really need to do a more thorough rewriting of the articles model to solve some of these problems.
Ok a bunch of comments on ACL in the CMS.
This is a bit rambly but hopefully some of the pieces will answer your question.
The CMS not surprisingly implements the ACL from the platform very directly and with only a few points where probably the authors perhaps would not be happy.
Profiles have nothing to do with ACL. They are just what ever you do with user plugins
#__usergroups is a table defining groups and their relationship to each other in nested sets. This lets us take advantage of the speed of transversing in a nested set.
Groups are mapped to both the seeing system and the doing system. These are loosely coupled and if you are not careful you can give a permission to do something on an asset that they can't see.
#__user_usergroups maps each user to one or more groups. Each group can be considered an identity.
Users can have multiple identities and for a given asset the most permissive identity holds.
#__viewlevels is the seeing clusters and how groups map to those. What is important about view levels, and makes them different than the actions, is that each item (asset or not) that has a view level can have one and only one. So you many need many view levels to capture all the permutations your require but you hope that won't be every permutation. All items (contacts, newsfeeds) have view levels whether or not they have action permissions.
#__users just .. is users with their ids.
Why are seeing and doing separate? Well Louis could certainly tell you what he was thinking, but my take on it is that there are number of reasons.
1. Seeing permissions applies to a lot more things than assets. For example modules and menu items are not assets (they are just things that reference assets i.e. manila envelopes.) yet we do want to control who can see them. So we need a system for that.
2. Every time you add another action type you add a level of complexity and there was a lot of sensitivity about both the performance implications and also how hard it would be for extension developers especially since the viewing permissions were already there in 1.5. In fact in the UCM work things are even simpler now, which a real focus on CRUD plus business rules you can implement.
Why didn't we go down to the item level in all components? Again, I think it was a combination of not wanting to mandate that for all components and also concern about performance. We were very worried about potentially having asset tables with tens of thousands of rows with inefficient nesting.
I would say that I think we should have a discussion about extending to item level for all components in the core for 3.0. That will make migration to UCM for 4.0 that much easier since UCM definitely has permissions at the item level for everything in the content table.
Basically in 1.6+ ACL the most important concept is the asset. in the core asset types are:
root (global)
component
category
items
If you never use items permission then you will never have to spend the time to cope with overriding inheritance from the categories.
If you never use category permissions you will never have to spend time dealing with category inheritance.
The CMS implementation always checks permissions up the branches although the API actually gives you the option not to do so.
The CMS defaults to soft deny in the absence of other information, again you could use the api to do it differently if you wanted.
So for performance you want to always stop at the level in the hierarchy that gives you the granularity you need but no more.
All this checking btw is done with just one visit to the database.
One other thing I will say about implementation in the CMS is that we attempted to make each action independent of the other actions. For example, you can have edit.state permission for an asset but not edit. You can have delete but not edit state. Again, whether it makes sense to go down to that level of granularity depends on your situation, but the infrastructure is there.
Elin