Fix being an administrator when using 3rd-party auth provider

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
chapril
Thomas Citharel 5 months ago
parent f997f573ba
commit c91e8f6bf3
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
  1. 2
      js/src/views/User/ProviderValidation.vue
  2. 2
      lib/web/views/auth_view.ex

@ -46,7 +46,7 @@ export default class ProviderValidate extends Vue {
id: userId,
email: userEmail,
isLoggedIn: true,
role: ICurrentUserRole.USER,
role: userRole,
},
});
const { data } = await this.$apollo.query<{ loggedUser: IUser }>({

@ -20,7 +20,7 @@ defmodule Mobilizon.Web.AuthView do
Tag.tag(:meta, name: "auth-refresh-token", content: refresh_token),
Tag.tag(:meta, name: "auth-user-id", content: user_id),
Tag.tag(:meta, name: "auth-user-email", content: user_email),
Tag.tag(:meta, name: "auth-user-role", content: user_role),
Tag.tag(:meta, name: "auth-user-role", content: String.upcase(to_string(user_role))),
Tag.tag(:meta, name: "auth-user-actor-id", content: user_actor_id)
]

Loading…
Cancel
Save