summaryrefslogtreecommitdiff
path: root/web/source/settings/lib
diff options
context:
space:
mode:
authorLibravatar f0x52 <f0x@cthu.lu>2022-11-23 16:10:02 +0100
committerLibravatar GitHub <noreply@github.com>2022-11-23 16:10:02 +0100
commit5ba5fb31546162513878dba773fabe8e241ee855 (patch)
treea0bb1f012c942e57bd9b2a2f72f2496ea8f2deff /web/source/settings/lib
parent[chore/frontend] remove references to unused bundle.js (#1128) (diff)
downloadgotosocial-5ba5fb31546162513878dba773fabe8e241ee855.tar.xz
[chore/frogend] fix profile preview css, use role info (#1130)
* fix profile preview css, use role info * remove unused redux selector
Diffstat (limited to 'web/source/settings/lib')
-rw-r--r--web/source/settings/lib/api/oauth.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/source/settings/lib/api/oauth.js b/web/source/settings/lib/api/oauth.js
index 76d0e9d2f..9410b4d8a 100644
--- a/web/source/settings/lib/api/oauth.js
+++ b/web/source/settings/lib/api/oauth.js
@@ -97,7 +97,10 @@ module.exports = function oauthAPI({ apiCall, getCurrentUrl }) {
}
// newer GoToSocial version will include a `role` in the Account data, check that first
- // TODO: check account data for admin status
+ if (state.user.profile.role == "admin") {
+ dispatch(oauth.setAdmin(true));
+ return true;
+ }
// no role info, try fetching an admin-only route and see if we get an error
return Promise.try(() => {