I am trying to prevent non-TWikiAdminGroup users from directly viewing the templates
WebTopicNonWikiTemplate and
WebTopicViewTemplate and keep them accessible as templates of inexistant topics. There seems to be no way to do this.
For
WebTopicEditTemplate (or any other template) for instance i do this by adding
%STARTSECTION{type="templateonly"}%
* Set ALLOWTOPICVIEW = Main.TWikiAdminGroup, Main.TWikiEditors
* Set ALLOWTOPICRENAME = Main.NobodyGroup
* Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup, Main.TWikiEditors
%ENDSECTION{type="templateonly"}%
but the same trick does not work with the above templates because the section is only stripped in
TWiki::expandVariablesOnTopicCreation()
, i.e., when a topic is created from the template.
Would it be possible to extend the handling of
WebTopicNonWikiTemplate and
WebTopicViewTemplate and to strip the
templateonly
sections in a similar way?
--
TWiki:Main/StefanWalter
- 2010-08-26
Not sure how to accomplish this with the current spec. Those topics are included, and INCLUDE adheres to to the access control settings. If you lock down the WebTopicNonWikiTemplate topic for view, users creating a new page would not be able to see the text of the included page.
We could open up INCLUDE with a new parameter to ignore the access control setting of the included page, but that would be a big security hole!
Any idea how to solve your need? BTW, why do you want to view restrict this admin page?
--
TWiki:Main.PeterThoeny
- 2010-08-26