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.
-
- 121 Posts
I have no idea how to do this... anyone?
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
).
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.
-
- 121 Posts
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?
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.
-
- 121 Posts
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…
-
- 121 Posts
Okay, I understand your tweet now. I’ve already posted this as a bug @ bugs.modx.com