You've already forked snikket-web-portal
Merge pull request #191 from snikket-im/fix/issue190
Ignore that users do not have access to metrics
This commit is contained in:
@@ -8,14 +8,14 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PROJECT VERSION\n"
|
"Project-Id-Version: PROJECT VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||||
"POT-Creation-Date: 2024-04-30 10:52+0100\n"
|
"POT-Creation-Date: 2024-08-11 16:36+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=utf-8\n"
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Generated-By: Babel 2.10.3\n"
|
"Generated-By: Babel 2.16.0\n"
|
||||||
|
|
||||||
#: snikket_web/admin.py:69 snikket_web/templates/admin_delete_user.html:10
|
#: snikket_web/admin.py:69 snikket_web/templates/admin_delete_user.html:10
|
||||||
#: snikket_web/templates/admin_edit_circle.html:73
|
#: snikket_web/templates/admin_edit_circle.html:73
|
||||||
@@ -334,7 +334,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: snikket_web/invite.py:299 snikket_web/templates/unauth.html:18
|
#: snikket_web/invite.py:299 snikket_web/templates/unauth.html:18
|
||||||
#: snikket_web/user.py:189
|
#: snikket_web/user.py:192
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -406,29 +406,29 @@ msgstr ""
|
|||||||
msgid "Upload"
|
msgid "Upload"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: snikket_web/user.py:122
|
#: snikket_web/user.py:125
|
||||||
msgid "Incorrect password."
|
msgid "Incorrect password."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: snikket_web/user.py:126
|
#: snikket_web/user.py:129
|
||||||
msgid "Password changed"
|
msgid "Password changed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: snikket_web/user.py:134
|
#: snikket_web/user.py:137
|
||||||
msgid ""
|
msgid ""
|
||||||
"The chosen avatar is too big. To be able to upload larger avatars, please"
|
"The chosen avatar is too big. To be able to upload larger avatars, please"
|
||||||
" use the app."
|
" use the app."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: snikket_web/user.py:181
|
#: snikket_web/user.py:184
|
||||||
msgid "Profile updated"
|
msgid "Profile updated"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: snikket_web/user.py:195
|
#: snikket_web/user.py:198
|
||||||
msgid "Export"
|
msgid "Export"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: snikket_web/user.py:213
|
#: snikket_web/user.py:216
|
||||||
msgid "You currently have no account data to export."
|
msgid "You currently have no account data to export."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,10 @@ class ImportAccountDataForm(BaseForm):
|
|||||||
@client.require_session()
|
@client.require_session()
|
||||||
async def index() -> str:
|
async def index() -> str:
|
||||||
user_info = await client.get_user_info()
|
user_info = await client.get_user_info()
|
||||||
metrics = await client.get_system_metrics()
|
try:
|
||||||
|
metrics = await client.get_system_metrics()
|
||||||
|
except (werkzeug.exceptions.Unauthorized, werkzeug.exceptions.Forbidden):
|
||||||
|
metrics = {}
|
||||||
return await render_template(
|
return await render_template(
|
||||||
"user_home.html",
|
"user_home.html",
|
||||||
user_info=user_info,
|
user_info=user_info,
|
||||||
|
|||||||
Reference in New Issue
Block a user