summaryrefslogtreecommitdiff
path: root/web/source/settings/lib
diff options
context:
space:
mode:
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(() => {