Skip to content

Commit

Permalink
FIX username
Browse files Browse the repository at this point in the history
  • Loading branch information
eboileau committed May 15, 2024
1 parent ed67a42 commit 20e2f59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/components/project/ProjectForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const onSubmit = handleSubmit((values) => {
})
onMounted(() => {
HTTPSecure.get('/access/username')
HTTPSecure.get('/user/get_username')
.then((response) => {
contact_email.value = response.data.username
})
Expand Down
7 changes: 7 additions & 0 deletions server/src/scimodom/api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,10 @@ def may_change_dataset(dataset_id):
return {"message": "Unknown dataset"}, 404

return {"write_access": permission_service.may_change_dataset(user, dataset)}


@user_api.route("/get_username", methods=["GET"])
@jwt_required()
def get_username():
email = get_jwt_identity()
return jsonify(username=email), 200

0 comments on commit 20e2f59

Please sign in to comment.