diff --git a/backend/app/main.py b/backend/app/main.py index 4bee061df33c4224f42335db81b5a9b49709229d..a26e955f5b2047adb52f2b0f5b03340a61cc68bd 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -382,10 +382,10 @@ def create_session( db: Session = Depends(get_db), current_user: schemas.User = Depends(get_jwt_user), ): - if not check_user_level(current_user, models.UserType.TUTOR): - raise HTTPException( - status_code=401, detail="You do not have permission to create a session" - ) + # if not check_user_level(current_user, models.UserType.TUTOR): + # raise HTTPException( + # status_code=401, detail="You do not have permission to create a session" + # ) return crud.create_session(db, current_user) @@ -453,11 +453,11 @@ def add_user_to_session( db: Session = Depends(get_db), current_user: schemas.User = Depends(get_jwt_user), ): - if not check_user_level(current_user, models.UserType.TUTOR): - raise HTTPException( - status_code=401, - detail="You do not have permission to add a user to a session", - ) + # if not check_user_level(current_user, models.UserType.TUTOR): + # raise HTTPException( + # status_code=401, + # detail="You do not have permission to add a user to a session", + # ) db_session = crud.get_session(db, session_id) if db_session is None: diff --git a/frontend/src/lang/fr.json b/frontend/src/lang/fr.json index 6638cf46e539ae86c2cee1c4db0b89dad610439f..3c84c434a928017d2582afd038e2d2f5f08cd501 100644 --- a/frontend/src/lang/fr.json +++ b/frontend/src/lang/fr.json @@ -23,7 +23,7 @@ "actions": "Actions", "add": "Ajouter", "deleteSessionConfirm": "Êtes-vous sûr de vouloir supprimer cette session ? Cette action est irréversible.", - "createSession": "Nouvelle session", + "createSession": "Session immédiate", "participantPlaceholder": "Choisir", "remainingDuration": "Temps restant", "nickname": "Nom", diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index d7eb1fffa474967280413186024f895674e72b74..5e591d7e9032f61073a03deb925a7cd6c4284e66 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -106,20 +106,18 @@ <div class="flex-grow flex-col flex"> {#if contact} <div class="p-4 pr-8"> - {#if $user?.is_tutor || $user?.is_admin} - <button on:click|preventDefault={createSession} class="button float-end"> - {$t('home.createSession')} - </button> - {:else} - <a - class="button float-end" - class:btn-disabled={!contact || !contact.calcom_link} - href={contact.calcom_link} - target="_blank" - > - {$t('home.bookSession')} - </a> - {/if} + <button on:click|preventDefault={createSession} class="button float-end"> + {$t('home.createSession')} + </button> + <div class="size-4 float-end"></div> + <a + class="button float-end" + class:btn-disabled={!contact || !contact.calcom_link} + href={contact.calcom_link} + target="_blank" + > + {$t('home.bookSession')} + </a> </div> <div class="flex-grow p-2"> <h2 class="text-xl my-4 font-bold">{$t('home.currentSessions')}</h2>