Assign Template category to Access Policy?

Good day,

I would like to let a user access policy only have access to certain templates that have their own category. I keep looking around for the answer, but its escaping my brain right now.

End goal is that I simply just want to clear out templates that the user will not need to use

  1. Put the templates in a category.

  2. Create or select a user group that the users do not belong to.

  3. Connect the category and the user group with an Element Category Access ACL entry with a context of mgr and some object-related policy.

1 Like

I’m including my clean install that shows 4 contents & 4 different groups, in hopes that anyone can either use this or can be modified to be more helpful.
Screen Shot 2020-07-29 at 9.31.01 PM

The part that finally clicked is this part.

This means I had to give every group the same style permissions. Later I created special ACL called “general” and used the category to hide those “base template” into a “general” category so it wont show up in other groups access → it’s honestly still confusing but I feel like I made a step in the right direction.



In order to hide everything it becomes a fine tooth comb of permissions.

Here is how I created a context and it’s ACL to keep group1 to only group1. Group 2 still sees all the other categories so you have setup an ACL for each context / category.

Context Access

Resource Group Access

Element Category

Media Access

Assigning user to Group 1

My brain hurst at this point.

3 Likes

Thank you for doing this and explaining things along the way with screen shots. I love ModX but the documentation on it is very lacking. Some documents are ancient, not well explained, or non existent. I try to over explain myself on these message boards for other users who aren’t strong developers to learn from my answers or to stir their problem fixing juices, so to speak.

I was assuming that you only had one group of users to hide one group of templates from. It looks like it’s more complicated than that, but I think you’re on the right track.

Maybe you’ve already done this, but it might make sense to connect all your template group categories to the Administrator group (assuming that none of the users in question are in that group). That will hide them from everyone.

Then you can connect your specific categories to their respective user groups to make them visible to each group.

The documentation is a community effort! At the bottom of each page you can find links to edit or report an issue.

Actually Bob your answer worked just fine. When I did it initially, for whatever reason, as a User I could only see templates that weren’t in the category, so I created another Template category and put all the other templates (the ones they shouldn’t see) and reassigned those rights to it, so its now working perfectly between the 15+ contexts I have.

Just wrestled with more ACL. This is my first foray into this stuff and theres a lot to know and experiment with. I’ll address that in a different thread though if I get stuck. Thanks again Bob for always wakin’ up and kickin’ butt

And I thought I was getting sophisticated with whopping 4-6 context website :sob:

You’re doing great!

Each context on my site is for a different user. No different languages, or whatever. It’s all the same content that they can edit individually