Skip to content

Commit

Permalink
Update add/new user to include general metadata so users can login.
Browse files Browse the repository at this point in the history
  • Loading branch information
srpiatt committed Apr 29, 2024
1 parent 8eec597 commit 4fe21dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/components/admin/user/UserForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@
}));
async function saveUser() {
const generalMetadata = JSON.parse(user?.generalMetadata || '{"email":""}');
generalMetadata.email = email;
let newUser = {
email,
connection: await getConnection(connection),
generalMetadata: JSON.stringify(generalMetadata),
active,
roles: await Promise.all(
roles
Expand Down
1 change: 1 addition & 0 deletions src/lib/models/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface User {
export interface ExtendedUser extends User {
subject?: string;
connection: string;
generalMetadata: string;
active: boolean;
roles: string[];
}
Expand Down

0 comments on commit 4fe21dc

Please sign in to comment.