Repository navigation
docs(auth): rewrite the access rules for the temporary password - #37
Merged
Merged
Conversation
Decision 21 replaced activation links by a temporary password with a mandatory change, and made the Admin the demo account. The product rules still said the opposite (AUTH-14, AUTH-15, USR-34). The owner also decided on 2026-10-07: the pending status and activatedAt leave the record, a Manager resets a forgotten password (AUTH-29), change-password stays only for the mandatory change (AUTH-24) and the e-mail becomes optional (USR-07). The 54 ADR citations left in docs/ now point to the decisions document. Code changes are comments only; behavior follows in the M1 issues.
The owner resolved OQ-01 on 2026-10-07: the signature is only shown on documents, so a column in the database is enough.
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No issue: this is stage 2 of the simplification plan (documentation only).
What
Rewrites the access rules in
docs/product/for the temporary password of decision 21, removes the text of the old plan about activation links and e-mail, and replaces the 54ADR-00xxcitations left indocs/by the matching decision ofdocs/decisoes-de-arquitetura.md. In the code, only comments change.Why
Decision 21 (2026-10-05) says a registered user gets a temporary password with a mandatory change, and the Admin is the demo account with a fixed password. AUTH-14, AUTH-15 and USR-34 still said the opposite. The owner decided the open points on 2026-10-07:
pendingstatus andactivatedAtleave the user record;Rules that changed meaning
active, with a temporary password and a mandatory changeadmin/admin123, fixed and shown on the sign-in screenactive, with the password the person hadRules retired
AUTH-03, AUTH-04, AUTH-05, AUTH-06, AUTH-10, AUTH-11, AUTH-12, AUTH-23, USR-32, USR-34.
New rules
AUTH-29 (password reset by a Manager), USR-35 (
temporaryPasswordwhen registering) and USR-36 (the signature is stored in the user's record; resolves OQ-01).Text only
AUTH-16, AUTH-19, USR-17, PERM-11, PERM-20, API-04, and the citations in AUTH-17, USR-16, USR-23, USR-25, PERM-13, PERM-22, PERM-24, CNV-04, CNV-09, CNV-10, CNV-12, API-01, API-06, API-07, API-12.
Contract changes written in the documents, not built
checkLink,activateAccount,requestPasswordReset,resetPassword(by link),resendAccess, the fieldemailSent, the fieldactivatedAt, the statuspending, and the codeslink_invalid,not_pending,email_missing.temporaryPasswordincreateUser, andPOST /api/v1/users/{id}/reset-password.statusacceptsactive,inactiveorall.ADR citations
Code and tests tied to each changed rule
Comments changed in this pull request; the behavior is listed for the M1 issues and was not changed.
pending)User.Create,User.Activate,User.Reactivate,UserStatus.Pending;UserTests(7 tests),SignInTests.Pending_account_…,AuthTestBed.AddPendingUser,UserPersistenceTests;Activateused as set-up inAuthTestSupport,AuditFieldsPersistenceTests,ConcurrencyPersistenceTests,UnitOfWorkPersistenceTestsactive, removeActivateandPending, with a migrationactivatedAt)User.ActivatedAt,User.CompleteFirstAccess,ChangePasswordHandler;UserTests(3 tests),ChangePasswordTests.Changing_the_initial_password_…,AdminFirstAccessApiTests,StartupSeedTests,AuthTestSupport.ResetAdminAsyncAdminOptions.InitialPassword,SystemRecordsSeeder,DependencyInjection(start-up validation),ControlService.API.http;AdminCredentialTests,AdminFirstAccessApiTests,ApiFactory,AuthTestBed.AddAdminWithInitialPasswordAdmin:InitialPasswordPasswordChangeRequiredFilter,ApiV1Group,ICredentialStore,UserCredential;SignInTests,RefreshSessionTests,AdminFirstAccessApiTestsAuthErrors.PasswordChangeRequiredAuthErrors.PasswordAlreadyCreated,AuthErrors.NewPasswordEqualsInitial;ChangePasswordTests,AdminFirstAccessApiTestsEmailAddress,User.Email;EmailAddressTests,UserTestsErrorStatusCodes(link_invalid,not_pending,email_missing);ErrorResultsTestsTests that still prove the previous plan no longer cite a rule that says the opposite: their comment says "previous plan, see decision 21".
Tests
Documentation and comments only, so there is no numbered list.
check.ps1: build with 0 warnings, 243 of 243 test cases passed.How to test
Read
docs/product/features/authentication.mdandusers.mdagainst decision 21.grep -rn "ADR-" docs README.mdreturns nothing.Still pointing to something that does not exist
pending,activatedAt, activation, the messages with "Esqueci minha senha", "senha inicial" and "link de ativação",Admin:InitialPassword, three error codes).README.md,backend/ControlService/README.md,docs/agents/guides/local-environment.mdandAppHost.cs: still true of the code until Remove the leftovers of the old plan (unused packages, Mailpit, template extras) #34.docs/frontend/describes a prototype whose access screens follow the e-mail model; the differences table lists what changes when it joins the repository.Checklist
check.ps1passes locally: build without warnings and all testsdocs/, README)