View list respects view-table permission, refs #811

Also makes a small change to the /fixtures.json JSON:

    "views": ["view_name"]

Is now:

    "views": [{"name": "view_name", "private": true}]
This commit is contained in:
Simon Willison 2020-06-08 11:20:21 -07:00
commit dcec89270a
3 changed files with 24 additions and 7 deletions

View file

@ -51,7 +51,7 @@
<h2 id="views">Views</h2>
<ul>
{% for view in views %}
<li><a href="{{ database_url(database) }}/{{ view|urlencode }}">{{ view }}</a></li>
<li><a href="{{ database_url(database) }}/{{ view.name|urlencode }}">{{ view.name }}</a>{% if view.private %} 🔒{% endif %}</li>
{% endfor %}
</ul>
{% endif %}