Check if email address is already taken#30
Conversation
…s changes - Update `userExists` in `src/lib/user.ts` to check both users and groups in Admin Directory. - Create `emailTaken.html` template for notifying users when their desired email is occupied. - Update `onFormSubmit` in `src/handlers/formHandler.ts` to automatically reject requests for taken emails. - Update `onEdit` in `src/handlers/editHandler.ts` to allow admins to trigger superior notification by manually changing status to 'Oczekiwanie na opiekuna'. Co-authored-by: pniedzwiedzinski <19212948+pniedzwiedzinski@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
| @@ -0,0 +1,25 @@ | |||
| <div class="header"> | |||
| <h1> | |||
| Wybrany adres | |||
There was a problem hiding this comment.
Po prostu Adres (adres) jest już zajęty
There was a problem hiding this comment.
Zmieniono nagłówek na 'Adres (adres) jest już zajęty'.
| <strong><?= mail ?></strong> jest już zajęty przez innego użytkownika lub grupę. | ||
| </p> | ||
| <p> | ||
| Twój wniosek został automatycznie odrzucony. Prosimy o kontakt z administratorem w celu ustalenia unikalnego adresu e-mail. |
There was a problem hiding this comment.
Lepiej będzie: Twój wniosek został automatycznie odrzucony. Możesz uzupełnić formularz jeszcze raz lub skontaktować się z administratorem z prośbą o nadanie unikalnego adresu e-mail.
There was a problem hiding this comment.
Zaktualizowano treść o możliwość ponownego wypełnienia formularza.
| Możesz odpowiedzieć bezpośrednio na tę wiadomość. | ||
| </p> | ||
| <p> | ||
| Po ustaleniu nowego adresu, administrator wprowadzi zmiany i prześle wniosek do ponownej weryfikacji. |
There was a problem hiding this comment.
To usuń - niepotrzebne
There was a problem hiding this comment.
Usunięto niepotrzebny fragment.
- Change header to 'Adres (adres) jest już zajęty' - Update rejection message to mention form resubmission - Remove redundant paragraph about admin edits Co-authored-by: pniedzwiedzinski <19212948+pniedzwiedzinski@users.noreply.github.com>
| <strong><?= mail ?></strong> jest już zajęty przez innego użytkownika lub grupę. | ||
| </p> | ||
| <p> | ||
| Twój wniosek został automatycznie odrzucony. Możesz uzupełnić formularz jeszcze raz lub skontaktować się z administratorem z prośbą o nadanie unikalnego adresu e-mail. |
There was a problem hiding this comment.
Dodaj jeszcze link do formularza
There was a problem hiding this comment.
Dodano link do formularza w treści maila.
- Pass `SURVEY_LINK` to `emailTaken` template in `formHandler.ts`. - Add button with survey link to `emailTaken.html`. Co-authored-by: pniedzwiedzinski <19212948+pniedzwiedzinski@users.noreply.github.com>
This change implements a check for email availability during new account requests. If a requested email address is already in use by another user or group in the Google Workspace domain, the request is automatically rejected, and the applicant is notified.
Additionally, it updates the
onEdithandler to support a manual workflow where an administrator can resolve email collisions. After correcting an email address in the spreadsheet, an admin can change the status to 'Oczekiwanie na opiekuna' to trigger the confirmation email to the superior.Fixes #29
PR created automatically by Jules for task 17692611204635579870 started by @pniedzwiedzinski