Commit Graph

30 Commits

Author SHA1 Message Date
0daf413b47 Prevent sole admin from deleting their account
Without this guard, the last admin in the system could delete their own
account, making the application unmanageable. This adds a model method
`User#sole_admin?`, a controller guard in `RegistrationsController#destroy`,
and disables the delete button in the profile edit view when the current
user is the only remaining admin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 06:52:14 +00:00
80130fb7d1 Allow cascade delete Unit/Quantity
Closes #32
2026-02-22 17:50:43 +01:00
1ba7d29441 Update tests to match labeled form changes 2026-02-22 00:55:21 +01:00
d250119601 Fix tests after routing/locale changes 2025-01-03 15:04:27 +01:00
3872acacc6 Fix flaky testing of emails on async actions 2024-03-16 16:06:16 +01:00
651534134e Refine tests 2024-01-17 05:41:08 +01:00
dec3af27bf Migrate Users views to grid layout + turbo_stream
Closes #7
2024-01-17 03:30:04 +01:00
93929f2c07 Change User#disguise/revert to GET 2024-01-15 01:07:45 +01:00
5c70736a91 Reword comments/descriptions 2024-01-05 21:56:57 +01:00
5b6e986170 Test user status update 2023-05-21 17:33:13 +02:00
f76344c220 Add action confirmation dialog 2023-05-14 17:57:20 +02:00
e4f595a329 Fix translations and enable i18n testing 2023-05-14 16:37:53 +02:00
54d8bc6b55 Fix typo 2023-05-14 16:17:08 +02:00
5e09adeae7 Update tests to use buttons
Add disguise/revert tests
2023-05-14 15:57:12 +02:00
a7fce807c5 Add Users#show 2023-05-05 18:29:11 +02:00
74965c5c0e Only user can delete his profile 2023-05-03 16:48:47 +02:00
74db85f26a Remove exception checking from system tests 2023-05-02 03:14:55 +02:00
60b7c2a0bd Test "users index visible only for admin" 2023-04-25 01:02:56 +02:00
b781c7e072 Test "delete user" 2023-04-25 00:40:50 +02:00
30a3ecd6d0 Update and test resend confirmation form 2023-04-19 19:50:15 +02:00
7dabbd3036 Update and test password recovery forms 2023-04-19 19:29:12 +02:00
894c21f322 Move reset buttons to corresponding forms 2023-04-19 01:32:06 +02:00
2d95b11a34 Test registration e-mail 2023-04-19 00:31:52 +02:00
71bc68efb3 Test "sign out" 2023-04-16 02:41:04 +02:00
5615113b9f Test "register" 2023-04-14 01:09:18 +02:00
cc857a74bf Randomize sign-in tests 2023-04-14 00:28:49 +02:00
0ddf6b9d22 Test "sign in fails with invalid credentials" 2023-04-13 02:04:53 +02:00
3f2a92a6e5 Test "sign in" 2023-04-12 23:23:37 +02:00
51985bc88e Prepare system testing 2023-04-11 20:50:13 +02:00
deaf0fa73b Generate User scaffold
bundle exec rails generate scaffold user email:string{64}:uniq
  status:integer
2023-03-11 22:56:32 +01:00