la_vecchia_wiki_moinmoin/HackingMoinMoin.html

197 lines
28 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>HackingMoinMoin</title>
<link rel="stylesheet" type="text/css" media="all" charset="utf-8" href="acaro/css/common.css">
<link rel="stylesheet" type="text/css" media="screen" charset="utf-8" href="acaro/css/screen.css">
<link rel="stylesheet" type="text/css" media="print" charset="utf-8" href="acaro/css/print.css">
<style type="text/css">
ul.pagetitle{
display: inline;
margin: 0;
padding: 0;
font-size: 1.5em;
}
li.pagetitle{
display: inline;
margin: 0;
}
td.noborder {
border: 0;
}
</style>
</head>
<body>
<table>
<tr>
<td class="noborder">
<img src="logo.png" width="85" height="85">
</td>
<td class="noborder">
<ul class="pagetitle">
<li class="pagetitle"><a class="backlink">HackingMoinMoin</a>
</ul>
<br><br>
[<a href="FrontPage.html">FrontPage</a>]
</td>
</tr>
</table>
<hr>
<div id="page">
<div dir="ltr" id="content" lang="it"><span class="anchor" id="top"></span>
<span class="anchor" id="line-1-1"></span><span class="anchor" id="line-2-1"></span><span class="anchor" id="line-3-1"></span><p class="line867">
<h1 id="Hacking_MoinMoin">Hacking MoinMoin</h1>
<span class="anchor" id="line-4-1"></span><span class="anchor" id="line-5-1"></span><p class="line867">
<h2 id="Installazione">Installazione</h2>
<span class="anchor" id="line-6-1"></span><span class="anchor" id="line-7-1"></span><p class="line874">Si supponga che nginx sia già in esecuzione e che uwsgi sia già installato. <span class="anchor" id="line-8-1"></span>Si suppone inoltre che nginx sia in esecuzione come utente <tt class="backtick">www</tt>. <span class="anchor" id="line-9-1"></span>Si scarichi la versione 1.9.8 di <a class="nonexistent" href="./MoinMoin.html">MoinMoin</a> e la si estragga in una directory a <span class="anchor" id="line-10-1"></span>scelta, in questo esempio <tt class="backtick">/usr/local/www/unit_moinmoin</tt>. <span class="anchor" id="line-11-1"></span><span class="anchor" id="line-12-1"></span><p class="line867">
<h3 id="Configurazione_di_uwsgi">Configurazione di uwsgi</h3>
<span class="anchor" id="line-13"></span><span class="anchor" id="line-14"></span><p class="line874">Si salvi la configurazione di uwsgi per la wiki, ad esempio in <span class="anchor" id="line-15"></span><tt class="backtick">/usr/local/etc/uwsgi/unit_moinmoin.ini</tt>. <span class="anchor" id="line-16"></span><span class="anchor" id="line-17"></span><p class="line867"><span class="anchor" id="line-18"></span><span class="anchor" id="line-19"></span><span class="anchor" id="line-20"></span><span class="anchor" id="line-21"></span><span class="anchor" id="line-22"></span><span class="anchor" id="line-23"></span><span class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span><span class="anchor" id="line-26"></span><span class="anchor" id="line-27"></span><span class="anchor" id="line-28"></span><span class="anchor" id="line-29"></span><span class="anchor" id="line-30"></span><span class="anchor" id="line-1-2"></span><div class="highlight ini"><div class="codearea" dir="ltr" lang="en">
<script type="text/javascript">
function isnumbered(obj) {
return obj.childNodes.length && obj.firstChild.childNodes.length && obj.firstChild.firstChild.className == 'LineNumber';
}
function nformat(num,chrs,add) {
var nlen = Math.max(0,chrs-(''+num).length), res = '';
while (nlen>0) { res += ' '; nlen-- }
return res+num+add;
}
function addnumber(did, nstart, nstep) {
var c = document.getElementById(did), l = c.firstChild, n = 1;
if (!isnumbered(c)) {
if (typeof nstart == 'undefined') nstart = 1;
if (typeof nstep == 'undefined') nstep = 1;
var n = nstart;
while (l != null) {
if (l.tagName == 'SPAN') {
var s = document.createElement('SPAN');
var a = document.createElement('A');
s.className = 'LineNumber';
a.appendChild(document.createTextNode(nformat(n,4,'')));
a.href = '#' + did + '_' + n;
s.appendChild(a);
s.appendChild(document.createTextNode(' '));
n += nstep;
if (l.childNodes.length) {
l.insertBefore(s, l.firstChild);
}
else {
l.appendChild(s);
}
}
l = l.nextSibling;
}
}
return false;
}
function remnumber(did) {
var c = document.getElementById(did), l = c.firstChild;
if (isnumbered(c)) {
while (l != null) {
if (l.tagName == 'SPAN' && l.firstChild.className == 'LineNumber') l.removeChild(l.firstChild);
l = l.nextSibling;
}
}
return false;
}
function togglenumber(did, nstart, nstep) {
var c = document.getElementById(did);
if (isnumbered(c)) {
remnumber(did);
} else {
addnumber(did,nstart,nstep);
}
return false;
}
</script>
<script type="text/javascript">
document.write('<a href="#" onclick="return togglenumber(\'CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959\', 1, 1);" \
class="codenumbers">Toggle line numbers<\/a>');
</script>
<pre dir="ltr" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959" lang="en"><span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_1"> 1</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_1"></span><span class="anchor" id="line-1-3"></span><span class="ResWord">[uwsgi]</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_2"> 2</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_2"></span><span class="anchor" id="line-2-2"></span><span class="ID">socket</span> = <span class="String">/tmp/unit_moinmoin.sock</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_3"> 3</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_3"></span><span class="anchor" id="line-3-2"></span><span class="ID">chmod-socket</span> = <span class="String">660</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_4"> 4</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_4"></span><span class="anchor" id="line-4-2"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_5"> 5</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_5"></span><span class="anchor" id="line-5-2"></span><span class="ID">chdir</span> = <span class="String">/usr/local/www/unit_moinmoin</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_6"> 6</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_6"></span><span class="anchor" id="line-6-2"></span><span class="ID">wsgi-file</span> = <span class="String">moin.wsgi</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_7"> 7</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_7"></span><span class="anchor" id="line-7-2"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_8"> 8</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_8"></span><span class="anchor" id="line-8-2"></span><span class="ID">master</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_9"> 9</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_9"></span><span class="anchor" id="line-9-2"></span><span class="ID">workers</span> = <span class="String">2</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_10"> 10</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_10"></span><span class="anchor" id="line-10-2"></span><span class="ID">max-requests</span> = <span class="String">200</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_11"> 11</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_11"></span><span class="anchor" id="line-11-2"></span><span class="ID">harakiri</span> = <span class="String">30</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_12"> 12</a> </span><span class="LineAnchor" id="CA-c01275fc9e10bc44e64465ec4cdbcab4bd9aa959_12"></span><span class="anchor" id="line-12-2"></span><span class="ID">die-on-term</span></span>
</pre></div></div><span class="anchor" id="line-31"></span><span class="anchor" id="line-32"></span><p class="line862">Si avvii il demone con <tt class="backtick">uwsgi&nbsp;-T&nbsp;--ini&nbsp;/usr/local/etc/uwsgi/unit_moinmoin.ini</tt>. <span class="anchor" id="line-33"></span><span class="anchor" id="line-34"></span><p class="line867">
<h3 id="Configurazione_di_nginx">Configurazione di nginx</h3>
<span class="anchor" id="line-35"></span><span class="anchor" id="line-36"></span><p class="line862">Aggiungere al blocco <tt class="backtick">server</tt> desiderato la direttiva <span class="anchor" id="line-37"></span><span class="anchor" id="line-38"></span><p class="line867"><span class="anchor" id="line-39"></span><span class="anchor" id="line-40"></span><span class="anchor" id="line-41"></span><span class="anchor" id="line-42"></span><span class="anchor" id="line-43"></span><span class="anchor" id="line-44"></span><span class="anchor" id="line-45"></span><span class="anchor" id="line-46"></span><span class="anchor" id="line-47"></span><span class="anchor" id="line-48"></span><span class="anchor" id="line-49"></span><span class="anchor" id="line-50"></span><span class="anchor" id="line-51"></span><pre><span class="anchor" id="line-1"></span>location / {
<span class="anchor" id="line-2"></span> uwsgi_pass /tmp/unit_moinmoin.sock;
<span class="anchor" id="line-3"></span> include uwsgi_params;
<span class="anchor" id="line-4"></span>}
<span class="anchor" id="line-5"></span>
<span class="anchor" id="line-6"></span>location = /favicon.ico {
<span class="anchor" id="line-7"></span> alias /usr/local/www/unit_moinmoin/static/favicon.ico;
<span class="anchor" id="line-8"></span>}
<span class="anchor" id="line-9"></span>
<span class="anchor" id="line-10"></span>location ~ ^/moin_static[0-9]+/(.*) {
<span class="anchor" id="line-11"></span> alias /usr/local/www/unit_moinmoin/static/$1;
<span class="anchor" id="line-12"></span>}</pre><span class="anchor" id="line-52"></span><span class="anchor" id="line-53"></span><p class="line874">Quindi ricaricare la configurazione come usuale. <span class="anchor" id="line-54"></span><span class="anchor" id="line-55"></span><p class="line867">
<h3 id="Configurazione_di_MoinMoin">Configurazione di MoinMoin</h3>
<span class="anchor" id="line-56"></span><span class="anchor" id="line-57"></span><p class="line867"><span class="anchor" id="line-58"></span><span class="anchor" id="line-59"></span><span class="anchor" id="line-60"></span><span class="anchor" id="line-61"></span><span class="anchor" id="line-62"></span><span class="anchor" id="line-63"></span><span class="anchor" id="line-64"></span><span class="anchor" id="line-65"></span><span class="anchor" id="line-66"></span><span class="anchor" id="line-67"></span><span class="anchor" id="line-68"></span><span class="anchor" id="line-69"></span><span class="anchor" id="line-70"></span><span class="anchor" id="line-71"></span><span class="anchor" id="line-72"></span><span class="anchor" id="line-73"></span><span class="anchor" id="line-74"></span><span class="anchor" id="line-75"></span><span class="anchor" id="line-76"></span><span class="anchor" id="line-77"></span><span class="anchor" id="line-78"></span><span class="anchor" id="line-79"></span><span class="anchor" id="line-80"></span><span class="anchor" id="line-81"></span><span class="anchor" id="line-1-4"></span><div class="highlight python"><div class="codearea" dir="ltr" lang="en">
<script type="text/javascript">
document.write('<a href="#" onclick="return togglenumber(\'CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6\', 1, 1);" \
class="codenumbers">Toggle line numbers<\/a>');
</script>
<pre dir="ltr" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6" lang="en"><span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_1"> 1</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_1"></span><span class="anchor" id="line-1-5"></span> <span class="Comment"># Wiki identity ----------------------------------------------------</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_2"> 2</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_2"></span><span class="anchor" id="line-2-3"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_3"> 3</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_3"></span><span class="anchor" id="line-3-3"></span> <span class="Comment"># Site name, used by default for wiki name-logo [Unicode]</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_4"> 4</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_4"></span><span class="anchor" id="line-4-3"></span> <span class="ID">sitename</span> = <span class="String">u</span><span class="String">'</span><span class="String">Unit</span><span class="String">'</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_5"> 5</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_5"></span><span class="anchor" id="line-5-3"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_6"> 6</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_6"></span><span class="anchor" id="line-6-3"></span> <span class="Comment"># Wiki logo. You can use an image, text or both. [Unicode]</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_7"> 7</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_7"></span><span class="anchor" id="line-7-3"></span> <span class="Comment"># For no logo or text, use '' - the default is to show the sitename.</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_8"> 8</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_8"></span><span class="anchor" id="line-8-3"></span> <span class="Comment"># See also url_prefix setting below!</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_9"> 9</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_9"></span><span class="anchor" id="line-9-3"></span> <span class="ID">logo_string</span> = <span class="String">u</span><span class="String">'</span><span class="String">&lt;img src=</span><span class="String">"</span><span class="String">%s</span><span class="String">/common/moinmoin.png</span><span class="String">"</span><span class="String"> alt=</span><span class="String">"</span><span class="String">MoinMoin Logo</span><span class="String">"</span><span class="String">&gt;</span><span class="String">'</span> % <span class="ID">url_prefix_static</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_10"> 10</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_10"></span><span class="anchor" id="line-10-3"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_11"> 11</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_11"></span><span class="anchor" id="line-11-3"></span> <span class="Comment"># name of entry page / front page [Unicode], choose one of those:</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_12"> 12</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_12"></span><span class="anchor" id="line-12-3"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_13"> 13</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_13"></span><span class="anchor" id="line-13-1"></span> <span class="Comment"># a) if most wiki content is in a single language</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_14"> 14</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_14"></span><span class="anchor" id="line-14-1"></span> <span class="Comment">#page_front_page = u"MyStartingPage"</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_15"> 15</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_15"></span><span class="anchor" id="line-15-1"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_16"> 16</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_16"></span><span class="anchor" id="line-16-1"></span> <span class="Comment"># b) if wiki content is maintained in many languages</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_17"> 17</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_17"></span><span class="anchor" id="line-17-1"></span> <span class="ID">page_front_page</span> = <span class="String">u</span><span class="String">"</span><span class="String">FrontPage</span><span class="String">"</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_18"> 18</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_18"></span><span class="anchor" id="line-18-1"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_19"> 19</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_19"></span><span class="anchor" id="line-19-1"></span> <span class="Comment"># The interwiki name used in interwiki links</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_20"> 20</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_20"></span><span class="anchor" id="line-20-1"></span> <span class="Comment">#interwikiname = u'UntitledWiki'</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_21"> 21</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_21"></span><span class="anchor" id="line-21-1"></span> <span class="Comment"># Show the interwiki name (and link it to page_front_page) in the Theme,</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_22"> 22</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_22"></span><span class="anchor" id="line-22-1"></span> <span class="Comment"># nice for farm setups or when your logo does not show the wiki's name.</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_23"> 23</a> </span><span class="LineAnchor" id="CA-8255b798afefd2950bdf523dd3da5b105d7ff5d6_23"></span><span class="anchor" id="line-23-1"></span> <span class="Comment">#show_interwiki = 1</span></span>
</pre></div></div><span class="anchor" id="line-82"></span><span class="anchor" id="line-83"></span><p class="line867"><em>(↓ da rivedere)</em> <span class="anchor" id="line-84"></span><span class="anchor" id="line-85"></span><span class="anchor" id="line-86"></span><span class="anchor" id="line-87"></span><span class="anchor" id="line-88"></span><span class="anchor" id="line-89"></span><span class="anchor" id="line-90"></span><span class="anchor" id="line-91"></span><span class="anchor" id="line-92"></span><span class="anchor" id="line-93"></span><span class="anchor" id="line-94"></span><span class="anchor" id="line-95"></span><span class="anchor" id="line-96"></span><span class="anchor" id="line-97"></span><span class="anchor" id="line-98"></span><span class="anchor" id="line-99"></span><span class="anchor" id="line-100"></span><span class="anchor" id="line-101"></span><span class="anchor" id="line-102"></span><span class="anchor" id="line-103"></span><span class="anchor" id="line-104"></span><span class="anchor" id="line-1-6"></span><div class="highlight python"><div class="codearea" dir="ltr" lang="en">
<script type="text/javascript">
document.write('<a href="#" onclick="return togglenumber(\'CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd\', 1, 1);" \
class="codenumbers">Toggle line numbers<\/a>');
</script>
<pre dir="ltr" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd" lang="en"><span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_1"> 1</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_1"></span><span class="anchor" id="line-1-7"></span> <span class="Comment"># Security ----------------------------------------------------------</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_2"> 2</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_2"></span><span class="anchor" id="line-2-4"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_3"> 3</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_3"></span><span class="anchor" id="line-3-4"></span> <span class="Comment"># This is checked by some rather critical and potentially harmful actions,</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_4"> 4</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_4"></span><span class="anchor" id="line-4-4"></span> <span class="Comment"># like despam or PackageInstaller action:</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_5"> 5</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_5"></span><span class="anchor" id="line-5-4"></span> <span class="ID">superuser</span> = [<span class="String">u</span><span class="String">"</span><span class="String">crudo</span><span class="String">"</span>, ]</span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_6"> 6</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_6"></span><span class="anchor" id="line-6-4"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_7"> 7</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_7"></span><span class="anchor" id="line-7-4"></span> <span class="Comment"># IMPORTANT: grant yourself admin rights! replace YourName with</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_8"> 8</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_8"></span><span class="anchor" id="line-8-4"></span> <span class="Comment"># your user name. See HelpOnAccessControlLists for more help.</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_9"> 9</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_9"></span><span class="anchor" id="line-9-4"></span> <span class="Comment"># All acl_rights_xxx options must use unicode [Unicode]</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_10"> 10</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_10"></span><span class="anchor" id="line-10-4"></span> <span class="ID">acl_rights_before</span> = <span class="String">u</span><span class="String">"</span><span class="String">crudo:read,write,delete,revert,admin EditorsGroup:read,write,delete,revert All:read</span><span class="String">"</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_11"> 11</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_11"></span><span class="anchor" id="line-11-4"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_12"> 12</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_12"></span><span class="anchor" id="line-12-4"></span> <span class="Comment"># The default (ENABLED) password_checker will keep users from choosing too</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_13"> 13</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_13"></span><span class="anchor" id="line-13-2"></span> <span class="Comment"># short or too easy passwords. If you don't like this and your site has</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_14"> 14</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_14"></span><span class="anchor" id="line-14-2"></span> <span class="Comment"># rather low security requirements, feel free to DISABLE the checker by:</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_15"> 15</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_15"></span><span class="anchor" id="line-15-2"></span> <span class="Comment">#password_checker = None # None means "don't do any password strength checks"</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_16"> 16</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_16"></span><span class="anchor" id="line-16-2"></span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_17"> 17</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_17"></span><span class="anchor" id="line-17-2"></span> <span class="Comment"># Link spam protection for public wikis (Uncomment to enable)</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_18"> 18</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_18"></span><span class="anchor" id="line-18-2"></span> <span class="Comment"># Needs a reliable internet connection.</span></span>
<span class="line"><span class="LineNumber"><a href="#CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_19"> 19</a> </span><span class="LineAnchor" id="CA-2ab206f8f2fd07b2fde6f2be64817414d4a09ffd_19"></span><span class="anchor" id="line-19-2"></span> <span class="Comment">#from MoinMoin.security.antispam import SecurityPolicy</span></span>
</pre></div></div><span class="anchor" id="line-105"></span><span class="anchor" id="bottom"></span></div>
</div>
<hr>
2024-11-06 23:21
</body>
</html>