summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/source/settings/index.js2
-rw-r--r--web/source/settings/user/profile.js2
-rw-r--r--web/template/profile.tmpl2
3 files changed, 3 insertions, 3 deletions
diff --git a/web/source/settings/index.js b/web/source/settings/index.js
index 812fff6b4..1be4f4a31 100644
--- a/web/source/settings/index.js
+++ b/web/source/settings/index.js
@@ -55,7 +55,7 @@ const nav = {
const { sidebar, panelRouter } = require("./lib/get-views")(nav);
function App({ account }) {
- const isAdmin = account.role == "admin";
+ const isAdmin = account.role.name == "admin";
const [logoutQuery] = query.useLogoutMutation();
return (
diff --git a/web/source/settings/user/profile.js b/web/source/settings/user/profile.js
index b2d2d25b3..c48ee0933 100644
--- a/web/source/settings/user/profile.js
+++ b/web/source/settings/user/profile.js
@@ -90,7 +90,7 @@ function UserProfileForm({ data: profile }) {
header={form.header.previewValue ?? profile.header}
display_name={form.displayName.value ?? profile.username}
username={profile.username}
- role={profile.role}
+ role={profile.role.name}
/>
<div className="files">
<div>
diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl
index e484bd618..d584676a6 100644
--- a/web/template/profile.tmpl
+++ b/web/template/profile.tmpl
@@ -34,7 +34,7 @@
<div class="usernamecontainer">
<div class="username">@{{ .account.Username }}@{{ .instance.AccountDomain }}</div>
{{- /* Only render account role if 1. it's present and 2. it's not equal to the standard 'user' role */ -}}
- {{ if and (.account.Role) (ne .account.Role "user") }}<div class="role {{ .account.Role }}">{{ .account.Role }}</div>{{ end }}
+ {{ if and (.account.Role) (ne .account.Role.Name "user") }}<div class="role {{ .account.Role.Name }}">{{ .account.Role.Name }}</div>{{ end }}
</div>
</div>
<div class="detailed">