mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Show padlock on private database page, refs #811
This commit is contained in:
parent
1cf86e5ecc
commit
3ce7f2e7da
3 changed files with 14 additions and 1 deletions
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<h1 style="padding-left: 10px; border-left: 10px solid #{{ database_color(database) }}">{{ metadata.title or database }}</h1>
|
||||
<h1 style="padding-left: 10px; border-left: 10px solid #{{ database_color(database) }}">{{ metadata.title or database }}{% if private %} 🔒{% endif %}</h1>
|
||||
|
||||
{% block description_source_license %}{% include "_description_source_license.html" %}{% endblock %}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,9 @@ class DatabaseView(DataView):
|
|||
"hidden_count": len([t for t in tables if t["hidden"]]),
|
||||
"views": views,
|
||||
"queries": canned_queries,
|
||||
"private": not await self.ds.permission_allowed(
|
||||
None, "view-database", "database", database
|
||||
),
|
||||
},
|
||||
{
|
||||
"show_hidden": request.args.get("_show_hidden"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue