We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22244
    • 144 Posts
    I have been looking into templates, permissions and Form Customizations but until now I haven’t been able to find a way to hide certain templates for certain user groups. I expected to find this in Form Customizations but I don’t see any option to hide a specific Template.

    Let’s say I want to hide the maintenance template that I made for all other User Groups except the Administrator.

    How to do that?
      • 28215
      • 4,149 Posts
      Element Category ACLs.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 22244
        • 144 Posts
        Thanks Shaun!
          • 22244
          • 144 Posts
          First I created an Category "Admin Templates" and assigned some templates to this category. Next I created an Element Category Access rule and assigned the right to view this specific category to the administrator usergroup.

          I expected other user groups without this rule assigned to them not to see these templates but after some permission flushes and cache refreshes they are still visible to all usergroups.

          Am I missing a step here?
            • 22303 MODX Staff
            • 10,725 Posts
            Did you assign the Category ACL to the mgr context? Did you flush all sessions and clear the cache? This worked for me first try... huh
              • 22244
              • 144 Posts
              Positive on all points.(see the screenprint)

              Flushed the sessions more than one time. Cleared the cache and even closed the browser windows a couple of times (despair mode ;-)
              Structure like this:
              MainTPLcat
              -AdminTPLcat ---tpl1
              ---tpl2
              ---tpl4
              ---tpl5
              ---tpl6

              So tpl1 and 2 should be hidden to all others except the the resource group with Category "Admin templates" assigned in my point of view and the rest tpl4,5 and 6 viewable for everybody.


              I’m just wondering why it is not possible to do this the easy way like with TVs. You can assign TVs to a resource group... Why not the same Access Permissions Tab for Templates.
                • 22303 MODX Staff
                • 10,725 Posts
                Quote from: onepack at Nov 21, 2010, 03:26 PM

                So tpl1 and 2 should be hidden to all others except the the resource group with Category "Admin templates" assigned in my point of view and the rest tpl4,5 and 6 viewable for everybody.

                I’m just wondering why it is not possible to do this the easy way like with TVs. You can assign TVs to a resource group... Why not the same Access Permissions Tab for Templates.
                I don’t understand; this has nothing to do with Resources or Resource Groups. This is for organizing and securing access to Categories of Elements in specific Contexts, in your case, you want to hide them from the mgr Context if they are not in the Administrators UserGroup, right?
                  • 22244
                  • 144 Posts
                  Yeah correct. (sorry for the part about TVs, I was thinking out loud)

                  What I mean is restricting the ability to select The Template from the dropdownlist in a Resource.

                  I just found this bug related to the same issue:

                  http://bugs.modx.com/issues/2661

                  I’ll wait to see what the outcome is from the 2661 bug.