Commit graph

49 commits

Author SHA1 Message Date
c381b86b5e Improve oidc only mode (#474)
All checks were successful
continuous-integration/drone/push Build is passing
## Description of the implemented changes
The changes were:
- [x] Bugfixing
- [x] New Feature
- [ ] Breaking Change
- [x] Refactoring

**OIDC-only mode improvements and UX tweaks (success toasts, unauthenticated redirect).**

## What has been changed?

### OIDC-only mode (new feature)
- **Admin settings:** "Only OIDC sign-in" is an immediate toggle at the top of the OIDC section (no save button). Enabling it also turns off "Allow direct registration". When OIDC-only is on, the registration checkbox is disabled and shows a tooltip (DaisyUI `<.tooltip>`).
- **Backend:** Password sign-in is forbidden via Ash policy (`OidcOnlyActive` check). Password registration is blocked via validation `OidcOnlyBlocksPasswordRegistration`. New plug `OidcOnlySignInRedirect`: when OIDC-only and OIDC are configured, GET `/sign-in` redirects to the OIDC flow; GET `/auth/user/password/sign_in_with_token` is rejected with redirect + flash. `AuthController.success/4` also rejects password sign-in when OIDC-only.
- **Tests:** GlobalSettingsLive (OIDC-only UI), AuthController (redirect and password sign-in rejection), User authentication (register_with_password blocked when OIDC-only).

### UX / behaviour (no new feature flag)
- **Success toasts:** Success flash messages auto-dismiss after 5 seconds via JS hook `FlashAutoDismiss` and optional `auto_clear_ms` on `<.flash>` (used for success in root layout and `flash_group`).
- **Unauthenticated users:** Redirect to sign-in without the "You don't have permission to access this page" flash; that message is only shown to logged-in users who lack access. Logic in `LiveHelpers` and `CheckPagePermission` plug; test updated accordingly.

### Other
- Layouts: comment about unprocessed join-request count no longer uses "TODO" (Credo).
- Gettext: German translation for "Home" (Startseite); POT/PO kept in sync.
- CHANGELOG: Unreleased section updated with the above.

## Definition of Done
### Code Quality
- [x] No new technical depths
- [x] Linting passed
- [x] Documentation is added where needed (module docs, comments where non-obvious)

### Accessibility
- [x] New elements are properly defined with html-tags (labels, aria-label on checkboxes)
- [x] Colour contrast follows WCAG criteria (unchanged)
- [x] Aria labels are added when needed (e.g. oidc-only and registration checkboxes)
- [x] Everything is accessible by keyboard (toggles and buttons unchanged)
- [x] Tab-Order is comprehensible
- [x] All interactive elements have a visible focus (existing patterns)

### Testing
- [x] Tests for new code are written (OIDC-only UI, auth controller, user auth; SMTP config builder and mailer)
- [x] All tests pass
- [ ] axe-core dev tools show no critical or major issues (not re-run for this PR; suggest spot-check on settings and sign-in)

## Additional Notes
- **OIDC-only:** When the `OIDC_ONLY` env var is set, the toggle is read-only and shows "(From OIDC_ONLY)". When OIDC is not configured, the toggle is disabled.
- **Invalidation:** Enabling OIDC-only sets `registration_enabled: false` in one update; disabling OIDC-only only updates `oidc_only` (registration left as-is).
- **Review focus:** Plug order in router (OidcOnlySignInRedirect), policy/validation order in User, and that all OIDC-only paths (form, plug, controller) stay consistent.

Reviewed-on: #474
Co-authored-by: Simon <s.thiessen@local-it.org>
Co-committed-by: Simon <s.thiessen@local-it.org>
2026-03-16 19:09:07 +01:00
104faf7006
feat: add theme selector to unauthenticated pages
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-13 14:48:10 +01:00
21812542ad
refactor: address review comments for join request settings
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/promote/production Build is passing
2026-03-10 16:47:38 +01:00
05e2a298fe
feat: add accessible drag&drop table component
All checks were successful
continuous-integration/drone/push Build is passing
2026-03-10 15:40:28 +01:00
fa738aae88
feat: add join form settings
Some checks failed
continuous-integration/drone/push Build is failing
2026-03-10 14:29:49 +01:00
70c3ca82ea
fix(a11y): WCAG 2 AA contrast, labels and dropdown
All checks were successful
continuous-integration/drone/push Build is passing
2026-03-04 16:21:17 +01:00
7a8b069834
Fix Credo Design (AliasUsage): add aliases in lib
Add module aliases at top and use short names instead of
fully qualified nested modules across lib/.
2026-03-04 16:21:15 +01:00
c71c7d6ed6 fix: color contrast dark mode and keyboard moadals 2026-02-26 15:24:29 +01:00
4ac56958b4 feat: keep empty cells consistent empty
All checks were successful
continuous-integration/drone/push Build is passing
2026-02-26 13:37:35 +01:00
2c49018ab7 feat: improve color contrast 2026-02-26 11:54:24 +01:00
2922a4d1ee feat: adds keyboard accessibility to tabs 2026-02-26 10:37:57 +01:00
73382c2c3f Merge branch 'main' into feat/421_accessibility
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-26 08:49:55 +01:00
d0b8cb672a style: consistent badges with sufficient color contrast 2026-02-26 08:33:52 +01:00
0f12befd11 style: consistent back button and some translations
All checks were successful
continuous-integration/drone/push Build is passing
2026-02-25 16:25:13 +01:00
e5a6003ace feat: sticky memberstable header
All checks were successful
continuous-integration/drone/push Build is passing
2026-02-25 14:16:43 +01:00
49fd2181a7 style: highlight selected table and add tooltip
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-25 13:16:27 +01:00
ff9f98f8e7 style: consitent flash messages 2026-02-25 09:45:10 +01:00
b7c93f19cb refactor: use core components 2026-02-25 09:17:32 +01:00
50c4ab049d
core_components: set aria-required for required inputs (WCAG)
ensure_aria_required_for_input/1 adds aria-required when required
in rest; applied to select, textarea and default input.
2026-02-23 22:51:13 +01:00
baa288bff3 refactor 2026-02-13 17:21:14 +01:00
fd1f4d02d5 style: fix styling 2026-02-11 13:55:02 +01:00
f6b35f03a5 feat: adds pdf export with imprintor
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-11 11:47:26 +01:00
36e57b24be Merge branch 'main' into feature/export_csv
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-06 08:02:05 +01:00
9b9e7ec995 fix: sorting and filter for export 2026-02-05 15:03:25 +01:00
083592489f ARIA: set aria-sort on th for sortable columns
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/promote/production Build is passing
- Table: optional col sort_field; th gets aria-sort when col is sorted.
- User index: pass sort_field/sort_order to table, sort_field: :email on email col.
2026-02-04 11:40:23 +01:00
286972964d CoreComponents: allow data-testid on button
Include data-testid in button rest for test selectors.
2026-02-03 17:16:10 +01:00
6311eebb0c fix linting
All checks were successful
continuous-integration/drone/push Build is passing
2026-01-08 11:41:24 +01:00
4e101ea36e feat: Add WCAG-compliant handling for boolean custom fields 2025-12-23 17:02:07 +01:00
222af635ae fix: make disabled links more robust in CoreComponents.button
Remove navigation attributes (href, navigate, patch) when disabled=true
to prevent 'Open in new tab' and 'Copy link' from working on disabled links.
This makes the disabled state semantically stronger and independent of CSS themes.
2025-12-16 14:48:18 +01:00
4e86351e1c feat: disable email buttons instead hide them 2025-12-16 14:35:00 +01:00
b1f6d29ca1
Merge remote-tracking branch 'origin/main' into feature/220_ui_issues_2
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-11 01:49:12 +01:00
c3e95ca711 formatting
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-08 11:51:45 +01:00
1b06f885bf Merge branch 'main' into feature/223_member_checkbox
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-08 11:43:54 +01:00
8512be0282 feat: reuse form_section in settings
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-04 12:32:24 +01:00
6029920c3f refactor: cleanup dropdown_menu component (required attr, remove redundant defaults, fix checkbox) 2025-12-03 18:42:49 +01:00
c17445975c Merge branch 'main' into feature/209_hide_field_dropdown
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-03 14:57:56 +01:00
8d1d04fa05 feat: increased accessibility 2025-12-03 14:55:31 +01:00
8e4f1ba674 feat: add col_click attribute to table component for checkbox column
- Add col_click slot attribute to table component that overrides row_click
- Clicking anywhere in the checkbox column now toggles the checkbox
- Clicking other columns still navigates to member details

Closes #223
2025-12-03 14:24:10 +01:00
366d4c104a
Prevent tables from growing the page horizontally 2025-12-03 14:20:14 +01:00
f0613fe1e5 Merge branch 'main' into feature/209_hide_field_dropdown
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-03 12:52:12 +01:00
eedd24b93c
Truncate long entries in tables to prevent height changes 2025-12-02 16:33:15 +01:00
a67a91cffa
Mark required fields in UI
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-02 15:23:44 +01:00
0fb43a0816 feat: adds field visibility dropdown live component
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-02 15:00:09 +01:00
ba78a6ac7a feat: improve email copy UX with colored alerts and mailto button
All checks were successful
continuous-integration/drone/push Build is passing
- Green success alert for copied confirmation
- Blue info alert with BCC privacy tip
- Mailto button opens email program with BCC recipients
- Alerts stack vertically instead of overlapping
2025-12-02 11:42:11 +01:00
82bd573276 formatting 2025-12-01 08:50:06 +01:00
100ed96493 feat: adds dynamic cols to table core component 2025-12-01 08:50:06 +01:00
0334260de5
feat: migration to phoenix 1.8 - merge changed files 2025-07-17 18:01:12 +02:00
6d426a21e8
liveview for new member fields 2025-06-18 23:35:25 +02:00
f2eeb95960
Add generated starter app 2025-03-18 15:05:27 +01:00