mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 14:26:30 +01:00
137 lines
No EOL
9.3 KiB
HTML
137 lines
No EOL
9.3 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>Building Permissions — Evennia 1.0-dev documentation</title>
|
||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||
<script src="_static/jquery.js"></script>
|
||
<script src="_static/underscore.js"></script>
|
||
<script src="_static/doctools.js"></script>
|
||
<script src="_static/language_data.js"></script>
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
|
||
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
|
||
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
|
||
|
||
</head><body>
|
||
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
|
||
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="building-permissions">
|
||
<h1>Building Permissions<a class="headerlink" href="#building-permissions" title="Permalink to this headline">¶</a></h1>
|
||
<p><em>OBS: This gives only a brief introduction to the access system. Locks and permissions are fully detailed</em> <a class="reference internal" href="Locks.html"><span class="doc">here</span></a>.</p>
|
||
<div class="section" id="the-super-user">
|
||
<h2>The super user<a class="headerlink" href="#the-super-user" title="Permalink to this headline">¶</a></h2>
|
||
<p>There are strictly speaking two types of users in Evennia, the <em>super user</em> and everyone else. The superuser is the first user you create, object <code class="docutils literal notranslate"><span class="pre">#1</span></code>. This is the all-powerful server-owner account. Technically the superuser not only has access to everything, it <em>bypasses</em> the permission checks entirely. This makes the superuser impossible to lock out, but makes it unsuitable to actually play-test the game’s locks and restrictions with (see <code class="docutils literal notranslate"><span class="pre">@quell</span></code> below). Usually there is no need to have but one superuser.</p>
|
||
</div>
|
||
<div class="section" id="assigning-permissions">
|
||
<h2>Assigning permissions<a class="headerlink" href="#assigning-permissions" title="Permalink to this headline">¶</a></h2>
|
||
<p>Whereas permissions can be used for anything, those put in <code class="docutils literal notranslate"><span class="pre">settings.PERMISSION_HIERARCHY</span></code> will have a ranking relative each other as well. We refer to these types of permissions as <em>hierarchical permissions</em>. When building locks to check these permissions, the <code class="docutils literal notranslate"><span class="pre">perm()</span></code> <a class="reference internal" href="Locks.html"><span class="doc">lock function</span></a> is used. By default Evennia creates the following hierarchy (spelled exactly like this):</p>
|
||
<ol class="simple">
|
||
<li><p><strong>Developers</strong> basically have the same access as superusers except that they do <em>not</em> sidestep the Permission system. Assign only to really trusted server-admin staff since this level gives access both to server reload/shutdown functionality as well as (and this may be more critical) gives access to the all-powerful <code class="docutils literal notranslate"><span class="pre">@py</span></code> command that allows the execution of arbitrary Python code on the command line.</p></li>
|
||
<li><p><strong>Admins</strong> can do everything <em>except</em> affecting the server functions themselves. So an Admin couldn’t reload or shutdown the server for example. They also cannot execute arbitrary Python code on the console or import files from the hard drive.</p></li>
|
||
<li><p><strong>Builders</strong> - have all the build commands, but cannot affect other accounts or mess with the server.</p></li>
|
||
<li><p><strong>Helpers</strong> are almost like a normal <em>Player</em>, but they can also add help files to the database.</p></li>
|
||
<li><p><strong>Players</strong> is the default group that new players end up in. A new player have permission to use tells and to use and create new channels.</p></li>
|
||
</ol>
|
||
<p>A user having a certain level of permission automatically have access to locks specifying access of a lower level.</p>
|
||
<p>To assign a new permission from inside the game, you need to be able to use the <code class="docutils literal notranslate"><span class="pre">@perm</span></code> command. This is an <em>Developer</em>-level command, but it could in principle be made lower-access since it only allows assignments equal or lower to your current level (so you cannot use it to escalate your own permission level). So, assuming you yourself have <em>Developer</em> access (or is superuser), you assign a new account “Tommy” to your core staff with the command</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@perm</span><span class="o">/</span><span class="n">account</span> <span class="n">Tommy</span> <span class="o">=</span> <span class="n">Developer</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>or</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@perm</span> <span class="o">*</span><span class="n">Tommy</span> <span class="o">=</span> <span class="n">Developer</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>We use a switch or the <code class="docutils literal notranslate"><span class="pre">*name</span></code> format to make sure to put the permission on the <em>Account</em> and not on any eventual <em>Character</em> that may also be named “Tommy”. This is usually what you want since the Account will then remain an Developer regardless of which Character they are currently controlling. To limit permission to a per-Character level you should instead use <em>quelling</em> (see below). Normally permissions can be any string, but for these special hierarchical permissions you can also use plural (“Developer” and “Developers” both grant the same powers).</p>
|
||
</div>
|
||
<div class="section" id="quelling-your-permissions">
|
||
<h2>Quelling your permissions<a class="headerlink" href="#quelling-your-permissions" title="Permalink to this headline">¶</a></h2>
|
||
<p>When developing it can be useful to check just how things would look had your permission-level been lower. For this you can use <em>quelling</em>. Normally, when you puppet a Character you are using your Account-level permission. So even if your Character only has <em>Accounts</em> level permissions, your <em>Developer</em>-level Account will take precedence. With the <code class="docutils literal notranslate"><span class="pre">@quell</span></code> command you can change so that the Character’s permission takes precedence instead:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="nd">@quell</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>This will allow you to test out the game using the current Character’s permission level. A developer or builder can thus in principle maintain several test characters, all using different permission levels. Note that you cannot escalate your permissions this way; If the Character happens to have a <em>higher</em> permission level than the Account, the <em>Account’s</em> (lower) permission will still be used.</p>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$('#searchbox').show(0);</script>
|
||
<p><h3><a href="index.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">Building Permissions</a><ul>
|
||
<li><a class="reference internal" href="#the-super-user">The super user</a></li>
|
||
<li><a class="reference internal" href="#assigning-permissions">Assigning permissions</a></li>
|
||
<li><a class="reference internal" href="#quelling-your-permissions">Quelling your permissions</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<div class="relations">
|
||
<h3>Related Topics</h3>
|
||
<ul>
|
||
<li><a href="index.html">Documentation overview</a><ul>
|
||
</ul></li>
|
||
</ul>
|
||
</div>
|
||
<div role="note" aria-label="source link">
|
||
<!--h3>This Page</h3-->
|
||
<ul class="this-page-menu">
|
||
<li><a href="_sources/Building-Permissions.md.txt"
|
||
rel="nofollow">Show Page Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<h3>Versions</h3>
|
||
<ul>
|
||
<li><a href="Building-Permissions.html">1.0-dev (develop branch)</a></li>
|
||
<li><a href="../0.9.1/index.html">0.9.1 (master branch)</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="footer">
|
||
©2020, The Evennia developer community.
|
||
|
||
|
|
||
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
|
||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
||
|
||
|
|
||
<a href="_sources/Building-Permissions.md.txt"
|
||
rel="nofollow">Page source</a>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
</body>
|
||
</html> |