We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18463
    • 121 Posts
    Martijn van Turnhout Reply #1, 13 years ago
    I would like to forbid the client to access a Homepage template in the [[*template]] field. I’ve currently got 3 different templates. I’d like to remove


    • the "empty" template option
    • and the custom made "Homepage" template

    for the client. I’ve already made an usergroup and custom profile, but how exactly do I accomplish the above?
    • Mark Hamstra Reply #2, 13 years ago
      Can’t you add the templates you want to be hidden to a category, and restrict access to that category through the security system?

      I’ve not yet used it in this way before, but that template dropdown should definitely be checking for access.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 18463
        • 121 Posts
        Martijn van Turnhout Reply #3, 13 years ago
        I have no idea how to do this... anyone?
        • Mark Hamstra Reply #4, 13 years ago
          Add the templates you want hidden to a category, eg "Secure Elements"

          Security -> Access Controls

          Add another user group based on the Administrator one (so with the context permissions, that’s pretty vital tongue).

          Go back to the original Administrator one, and authorize it to use your "Secure Elements" element category. This will protect it and block it from groups that don’t have it.

          Create a user with the user group you just created. Flush all permissions and try to login with the new user.
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • 18463
            • 121 Posts
            Martijn van Turnhout Reply #5, 13 years ago
            Thanks! Didn’t know you could also restrict access to categories, next to document groups. The access policy for that category should be "load, list & view" right?

            It’s nearly solved. There’s still 1 thing bugging me: I can’t get access to the "(empty)" template. Any way I can modify that "template" as well?
            • Mark Hamstra Reply #6, 13 years ago
              I *think* (not that proficient w/ the security system anymore/never have been) with load, list & view you can just, well, load list & view it, lol.

              If you also want to give access to modify it I think you’d need to use "Element", and if you just want to be able to use it as an object (so in scripting) it’d be Object.

              But like I said - not too proficient with it, though I hope to be messing with it some more, soon.


              AFAIK, "empty" isn’t a template so it can’t be categorized either.... but if it’s not categorized (and ’protected’) it should just show up. You could always make an "Empty" template yourself and use that w/ categories in the way you need it, and just put [[*content]] in there.
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                • 18463
                • 121 Posts
                Martijn van Turnhout Reply #7, 13 years ago
                I read up on this article again: http://bobsguides.com/revolution-permissions.html. Really helps me a lot. Thanks for your help though. It would be awesome if I could gain access to the "empty" template as well though. That would bring Revo up to speed with MM’s features.
                  • 18463
                  • 121 Posts
                  Martijn van Turnhout Reply #8, 13 years ago
                  I think I discovered another bug. I’ve put the Homepage-template in that category now. I’m logging out as admin and logging in as client. I can open the Homepage document, but I cannot access the Template Variables tab anymore! The tab only appears again when I remove the template from the secured category...

                  Bummer.
                  • That’s what i was talking about on twitter. No luck in finding a solution for now…
                      • 18463
                      • 121 Posts
                      Martijn van Turnhout Reply #10, 13 years ago
                      Okay, I understand your tweet now. I’ve already posted this as a bug @ bugs.modx.com