# ACL options

Source: https://zotonic.com/docs/2169/acl-options

URI: https://zotonic.com/id/2169

Language: en



<div>
            
  <div class="section">

<p><a class="reference internal" href="/id/doc_developerguide_access_control#guide-authorization"><span class="std std-ref">Authorization</span></a> checks to perform, in addition to the
<code class="docutils literal notranslate"><span class="pre">acl_action</span></code> dispatch option, can be given in the <code class="docutils literal notranslate"><span class="pre">acl</span></code> dispatch
option, and accepts the following options:</p>
<div class="table-wrapper"><table border="1" class="docutils">

<thead valign="bottom">
<tr><th class="head">ACL option</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><code class="docutils literal notranslate"><span class="pre">is_auth</span></code></td>
<td>Disable anonymous access to this resource.</td>
<td><code class="docutils literal notranslate"><span class="pre">{acl,</span> <span class="pre">is_auth}</span></code></td>
</tr>
<tr><td><code class="docutils literal notranslate"><span class="pre">logoff</span></code></td>
<td>Log out user before processing the request.</td>
<td><code class="docutils literal notranslate"><span class="pre">{acl,</span> <span class="pre">logoff}</span></code></td>
</tr>
<tr><td><code class="docutils literal notranslate"><span class="pre">{Action,</span> <span class="pre">Resource}</span></code></td>
<td>Check if user is allowed to perform <code class="docutils literal notranslate"><span class="pre">Action</span></code>
on <code class="docutils literal notranslate"><span class="pre">Resource</span></code>. The example is equivalent to
the options <code class="docutils literal notranslate"><span class="pre">{acl_action,</span> <span class="pre">edit},</span> <span class="pre">{id,</span>
<span class="pre">my_named_page}</span></code>.</td>
<td><code class="docutils literal notranslate"><span class="pre">{acl,</span> <span class="pre">{edit,</span> <span class="pre">my_named_page}}</span></code></td>
</tr>
<tr><td><code class="docutils literal notranslate"><span class="pre">[{Action,</span> <span class="pre">Resource}]</span></code></td>
<td>A list of checks to be performed, as above.</td>
<td><div class="first last highlight-erlang notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="n">acl</span><span class="p">,</span> <span class="p">[</span>
    <span class="p">{</span><span class="n">view</span><span class="p">,</span> <span class="n">secret_page</span><span class="p">},</span>
    <span class="p">{</span><span class="n">update</span><span class="p">,</span> <span class="mi">345</span><span class="p">}</span>
<span class="p">]}</span>
</pre></div>
</div>
</td>
</tr>
<tr><td><code class="docutils literal notranslate"><span class="pre">ignore</span></code></td>
<td>Don’t perform any access control checks.
Be careful to add your own checks in the
rendered template and all its included
templates.</td>
<td><code class="docutils literal notranslate"><span class="pre">{acl,</span> <span class="pre">ignore}</span></code></td>
</tr>
</tbody>
</table></div>
</div>


           </div>

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2169?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2169?language=en>)
