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

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-04-28 11:43:05 +02:00
parent f997f573ba
commit c91e8f6bf3
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -20,7 +20,7 @@ defmodule Mobilizon.Web.AuthView do
Tag.tag(:meta, name: "auth-refresh-token", content: refresh_token), 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-id", content: user_id),
Tag.tag(:meta, name: "auth-user-email", content: user_email), 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) Tag.tag(:meta, name: "auth-user-actor-id", content: user_actor_id)
] ]