From 5ba5fb31546162513878dba773fabe8e241ee855 Mon Sep 17 00:00:00 2001 From: f0x52 Date: Wed, 23 Nov 2022 16:10:02 +0100 Subject: [chore/frogend] fix profile preview css, use role info (#1130) * fix profile preview css, use role info * remove unused redux selector --- web/source/settings/lib/api/oauth.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/source/settings/lib/api/oauth.js') 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(() => { -- cgit v1.2.3