mirror of
https://github.com/simonw/datasette.git
synced 2026-08-26 03:04:41 +02:00
47 lines
1.7 KiB
HTML
47 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Debug allow rules{% endblock %}
|
|
|
|
{% block extra_head %}
|
|
{% include "_permission_ui_styles.html" %}
|
|
<style>
|
|
p.message-warning {
|
|
white-space: pre-wrap;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<h1>Debug allow rules</h1>
|
|
|
|
{% set current_tab = "allow_debug" %}
|
|
{% include "_permissions_debug_tabs.html" %}
|
|
|
|
<p>Use this tool to try out different actor and allow combinations. See <a href="https://docs.datasette.io/en/stable/authentication.html#defining-permissions-with-allow-blocks">Defining permissions with "allow" blocks</a> for documentation.</p>
|
|
|
|
<div class="permission-form">
|
|
<form class="core" action="{{ urls.path('-/allow-debug') }}" method="get">
|
|
<div class="permission-form-grid">
|
|
<div class="form-section">
|
|
<label for="allow-block">Allow block</label>
|
|
<textarea class="permission-textarea" id="allow-block" name="allow">{{ allow_input }}</textarea>
|
|
</div>
|
|
<div class="form-section">
|
|
<label for="allow-actor">Actor</label>
|
|
<textarea class="permission-textarea" id="allow-actor" name="actor">{{ actor_input }}</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="form-actions">
|
|
<button type="submit" class="submit-btn">Apply allow block to actor</button>
|
|
</div>
|
|
</form>
|
|
|
|
{% if error %}<p class="message-warning permission-form-result">{{ error }}</p>{% endif %}
|
|
|
|
{% if result == "True" %}<p class="message-info permission-form-result">Result: allow</p>{% endif %}
|
|
|
|
{% if result == "False" %}<p class="message-error permission-form-result">Result: deny</p>{% endif %}
|
|
</div>
|
|
|
|
{% endblock %}
|