Commit b2dce1f
authored
fix(meetings): match registrant by username for restricted join (#636)
* fix(meetings): match registrant by username for join (LFXV2-1634)
Public meeting join and "my RSVP" lookups now identify the user by
their registrant rather than just their auth email. Resolves the case
where an account has multiple emails (auth-provider primary differs
from invited registrant email), which previously caused a false "not
registered" denial on join and a missing RSVP on the meeting page.
- Restricted-meeting access check matches by username first, falling
back to email; the matched registrant's stored email is used for the
upstream join_link call so Zoom resolves to the correct invitee.
- Current-user RSVP lookup resolves the registrant via email-or-
username, then filters RSVPs by registrant_id — RSVP records carry
registrant_id reliably, while their username field is often null.
Signed-off-by: Asitha de Silva <asithade@gmail.com>
* fix(review): address PR #636 review feedback
Address review comments from copilot[bot], coderabbitai:
- meeting.service.ts: switched RSVP lookup from getUsernameFromAuth to
getEffectiveUsername — the former returns the OIDC `sub` (e.g.
`auth0|<id>`) for non-Authelia sessions, the latter returns the LFID
nickname that matches `registrant.username` (per copilot[bot])
- meeting.service.ts: filter RSVPs by a Set of all matching registrant
UIDs rather than only registrants[0], so users with occurrence-
specific invites or multiple registrant rows for the same meeting
see all their RSVPs (per copilot[bot], coderabbitai)
- public-meeting.controller.ts: identity-neutral validation and
authorization error messages — failures via the username path no
longer claim the problem was a missing or unmatched email address
(per copilot[bot], coderabbitai)
Resolves 6 review threads.
Signed-off-by: Asitha de Silva <asithade@gmail.com>
* fix(meetings): match restricted-join denial by error code, not message
The previous commit changed the restricted-meeting denial message to
identity-neutral wording, which broke the meeting-join UI's alternate-
email affordance — meeting-join.component.ts only showed the "Click
here to join using a different email address" link when the error
message contained the substring "email address is not registered for
this restricted meeting".
Replace the brittle substring match with a stable error code:
- AuthorizationError now accepts an optional `code` override so call
sites can emit a more specific code than the generic
AUTHORIZATION_REQUIRED.
- The restricted-meeting denial path now throws with
code: 'NOT_REGISTERED_FOR_MEETING'.
- meeting-join.component.ts captures `error.error.code` from the API
response into a new joinUrlErrorCode signal and matches the email-
fallback affordance on that code instead of the message text.
Signed-off-by: Asitha de Silva <asithade@gmail.com>
---------
Signed-off-by: Asitha de Silva <asithade@gmail.com>1 parent 6063284 commit b2dce1f
4 files changed
Lines changed: 69 additions & 37 deletions
File tree
- apps/lfx-one/src
- app/modules/meetings/meeting-join
- server
- controllers
- errors
- services
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
| 350 | + | |
349 | 351 | | |
350 | 352 | | |
351 | 353 | | |
| |||
766 | 768 | | |
767 | 769 | | |
768 | 770 | | |
| 771 | + | |
769 | 772 | | |
770 | 773 | | |
771 | 774 | | |
| |||
833 | 836 | | |
834 | 837 | | |
835 | 838 | | |
| 839 | + | |
836 | 840 | | |
837 | 841 | | |
838 | 842 | | |
| |||
1005 | 1009 | | |
1006 | 1010 | | |
1007 | 1011 | | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
| 1012 | + | |
1011 | 1013 | | |
1012 | 1014 | | |
1013 | 1015 | | |
| |||
Lines changed: 41 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
| |||
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
295 | | - | |
296 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
297 | 300 | | |
298 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
299 | 305 | | |
300 | 306 | | |
301 | | - | |
| 307 | + | |
302 | 308 | | |
303 | 309 | | |
304 | 310 | | |
305 | 311 | | |
306 | | - | |
| 312 | + | |
307 | 313 | | |
308 | 314 | | |
309 | 315 | | |
| |||
495 | 501 | | |
496 | 502 | | |
497 | 503 | | |
498 | | - | |
| 504 | + | |
499 | 505 | | |
500 | 506 | | |
501 | 507 | | |
| 508 | + | |
502 | 509 | | |
503 | 510 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
| 511 | + | |
| 512 | + | |
508 | 513 | | |
509 | 514 | | |
510 | 515 | | |
511 | 516 | | |
| 517 | + | |
512 | 518 | | |
513 | | - | |
514 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
515 | 535 | | |
516 | 536 | | |
517 | | - | |
518 | | - | |
519 | 537 | | |
520 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
521 | 541 | | |
522 | 542 | | |
523 | 543 | | |
| 544 | + | |
524 | 545 | | |
525 | | - | |
526 | 546 | | |
527 | 547 | | |
528 | 548 | | |
529 | 549 | | |
530 | | - | |
531 | 550 | | |
| 551 | + | |
532 | 552 | | |
| 553 | + | |
| 554 | + | |
533 | 555 | | |
534 | 556 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
889 | 889 | | |
890 | 890 | | |
891 | 891 | | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
897 | 901 | | |
898 | 902 | | |
899 | 903 | | |
900 | 904 | | |
901 | 905 | | |
902 | 906 | | |
903 | | - | |
904 | | - | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
905 | 915 | | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
| 916 | + | |
| 917 | + | |
912 | 918 | | |
913 | 919 | | |
914 | 920 | | |
| |||
0 commit comments