我需要为twiki做一些设置。
在Linux上嵌入了twiki,并为该站点启用了httpd基本身份验证。
默认情况下,使用apache身份验证登录的用户可以在每个页面上查看编辑选项。我希望所有用户都将其视为不可编辑的普通主题。我已经使用admin用户注册了一个twiki帐户。我想使用此帐户编辑每个主题。
你能解释一下如何设置它吗?
最好的问候, Srinivas.M
答案 0 :(得分:0)
您需要编辑模板才能执行此操作。
查看templates/viewtopicactionbuttons.tmpl
并找到如下所示的行:
%TMPL:DEF{"edit_or_create"}%%TMPL:P{context="new_topic" then="create_topic_link" else="edit_topic_link"}%%TMPL:END%
您需要更改它以检查用户是否已登录,只显示该按钮。尝试这样的事情(未经测试):
%TMPL:DEF{"edit_or_create"}%%TMPL:P{context="authenticated" then="%TMPL:P{context="new_topic" then="create_topic_link" else="edit_topic_link"}%"}%TMPL:END%