Files
gitea/.codex-history.md
T
petru 1e13af4d6e
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
Modified - Added install-time admin management policy choices with direct-grantor and inherited-grantor enforcement.
Modified - Updated the example app.ini documentation for the new administrator management policies.
2026-04-30 21:07:08 +00:00

52 KiB

Project Change ID[date-time] - application-version - Type - Summary:

0 - [2026-04-16 02:46:18] - v.1.27.0-dev-38-g4b334df6d4 - Type: Modified - Added explicit repository visibility badges to match the requested GitHub-style presentation more closely.

  • 1 - I modified templates/repo/header.tmpl so the repository page header now always shows a visibility badge on the right side: Private, Internal, or Public.
  • 2 - I modified templates/shared/repo/list.tmpl so each repository entry in shared repository lists also shows an explicit visibility badge for Private, Internal, or Public.
  • 3 - I added the Public label for repositories that previously had no explicit visibility badge, while preserving the existing archived, template, and sha256 labels.
  • 4 - I reused existing translation keys and existing badge styling so the change stays visually consistent with the current Gitea UI.

1 - [2026-04-16 03:31:29] - v.1.27.0-dev-38-g4b334df6d4 - Type: Modified - Refined repository visibility badges with semantic colors, owner-aware navigation, and broader coverage in repository settings views.

  • 1 - I modified templates/shared/repo/list.tmpl so Public now uses a basic green badge and Private now uses a basic red badge, while Internal remains neutral.
  • 2 - I modified templates/repo/header.tmpl so the repository header uses the same color-coded visibility badges and keeps the mobile icon behavior unchanged.
  • 3 - I added owner-aware navigation for the Public and Private badges so they link to the repository Settings page only when the signed-in user is the repository owner.
  • 4 - I modified templates/user/settings/repos.tmpl so the same visibility badge now appears next to repository names in /user/settings/repos, in both list variants rendered by that page.
  • 5 - I preserved the existing archived, template, fork, mirror, and object-format indicators so only the requested visibility presentation changed.

2 - [2026-04-16 03:45:08] - v.1.27.0-dev-38-g4b334df6d4 - Type: Fixed - Corrected a template rendering error in /user/settings/repos caused by dereferencing a missing Owner object.

  • 1 - I fixed templates/user/settings/repos.tmpl so the internal-visibility check now guards against a nil Owner before accessing Owner.Visibility.
  • 2 - I applied the null-safe visibility guard in both repository list variants rendered by /user/settings/repos.
  • 3 - I preserved the new green/red visibility badge styling and owner-aware settings links while removing the nil-pointer render failure.

3 - [2026-04-16 04:53:24] - v.1.27.0-dev-38-g4b334df6d4 - Type: Modified - Hid the admin privilege toggle when an administrator edits their own account from the admin user edit page.

  • 1 - I modified templates/admin/user/edit.tmpl so the Is Administrator checkbox is no longer rendered when the edited user ID matches the signed-in admin ID.
  • 2 - I preserved the existing checkbox behavior for editing other users, so administrators can still grant or revoke admin rights for other accounts.
  • 3 - I kept the change limited to the admin edit UI without altering unrelated fields or backend update logic.

4 - [2026-04-16 03:11:08] - v.1.27.0-dev-38-g4b334df6d4 - Type: Modified - Disabled the self-account deletion option only for the last administrator and aligned the backend rule with that behavior.

  • 1 - I modified templates/user/settings/account.tmpl so the Delete Your Account action is disabled and shows the last-admin warning when the signed-in user is the only remaining admin.
  • 2 - I modified routers/web/user/setting/account.go so the account settings page now receives an IsLastAdminUser flag used by the template.
  • 3 - I updated the self-delete backend flow so it blocks account deletion only when the signed-in user is the last admin, instead of blocking every admin unconditionally.

5 - [2026-04-16 03:26:40] - v.1.27.0-dev-38-g4b334df6d4 - Type: Fixed - Adjusted the shared last-admin detection to count only active administrators so account deletion and admin demotion rules behave correctly in real instances.

  • 1 - I modified models/user/user.go so IsLastAdminUser now treats only active admins as candidates when deciding whether a user is the last admin.
  • 2 - This aligns the shared last-admin protection used by account deletion and admin privilege update flows with practical instance behavior.
  • 3 - The existing /user/settings/account UI and backend guards now work against the refined active-admin definition without additional template changes.

6 - [2026-04-16 03:43:20] - v.1.27.0-dev-38-g4b334df6d4 - Type: Modified - Updated the Delete Your Account panel for the last-admin case so it shows a direct warning message and hides the deletion controls.

  • 1 - I modified templates/user/settings/account.tmpl so the panel now shows You cannot remove the last admin. There must be at least one admin. while keeping the existing alert icon.
  • 2 - I hid the Password field for the last-admin case.
  • 3 - I hid the Confirm Deletion button for the last-admin case while preserving the normal delete flow for other users.

7 - [2026-04-16 17:37:53] - v.1.27.0-dev-40-gc3b9d21472 - Type: Added - Added administrator notifications for pending account requests and delayed the user activation email until manual approval.

  • 1 - I added a new email_notification.new_account_requests user setting in models/user/setting_options.go, with an admin-default enabled preference and helper functions to read the preference consistently.
  • 2 - I modified routers/web/user/setting/notifications.go, routers/web/web.go, and templates/user/settings/notifications.tmpl so administrators now get a New account request notifications checkbox in /user/settings/notifications, and the last active admin cannot disable it.
  • 3 - I modified routers/web/auth/auth.go, services/mailer/mail_user.go, templates/mail/user/auth/new_account_request.tmpl, and options/locale/locale_en-US.json so manual account requests now send notification emails to opted-in active admins with a direct review link.
  • 4 - I modified routers/web/admin/users.go so when an administrator activates a manually approved account while registration email confirmation is disabled, the applicant receives the standard account activation email at that approval moment.

8 - [2026-04-16 18:59:58] - v.1.27.0-dev-41-g97eee0a9a8 - Type: Fixed - Corrected the new account request notification rule so at least one active administrator must remain subscribed.

  • 1 - I modified models/user/setting_options.go to count active administrators who still have new account request notifications enabled and to detect when the current admin is the last enabled recipient.
  • 2 - I modified routers/web/user/setting/notifications.go so the backend now blocks disabling the preference only when the signed-in admin is the last enabled notification recipient, instead of checking whether they are merely the last admin user.
  • 3 - I modified templates/user/settings/notifications.tmpl so the checkbox and submit button are disabled only for the last enabled notification recipient.
  • 4 - I updated options/locale/locale_en-US.json so the warning message now states the real rule clearly: at least one admin must keep these notifications enabled.

9 - [2026-04-16 20:53:32] - v.1.27.0-dev-41-g97eee0a9a8 - Type: Added - Added automatic notification fallback when deleting the only admin who still receives new account request notifications.

  • 1 - I added ShouldEnableNewAccountRequestNotificationsFallback in models/user/setting_options.go so the code can detect when the deleted user is the last active admin with this notification enabled and the acting admin is currently unsubscribed.
  • 2 - I modified routers/web/admin/users.go so, after a successful admin-driven user deletion, the acting admin is automatically subscribed to new account request notifications when they deleted the last subscribed admin.
  • 3 - I modified routers/api/v1/admin/user.go so the same automatic fallback also applies to admin deletions performed through the API, keeping the behavior consistent across both deletion entry points.

10 - [2026-04-16 23:02:55] - v.1.27.0-dev-42-g81727dd3e9 - Type: Added - Implemented a staged new account request workflow with email validation, admin review, request statuses, and automatic expiry cleanup.

  • 1 - I added models/user/account_request.go to store and manage account request states, validation expiry, retry counting, approval or rejection metadata, validation code generation, and expired pending-request cleanup.
  • 2 - I modified routers/web/auth/auth.go, added routers/web/auth/account_request.go, and updated templates/user/auth/signup_inner.tmpl so registration now creates pending account requests, resends validation mail when appropriate, blocks repeated unconfirmed attempts after five tries, and moves validated requests into administrator review instead of activating them immediately.
  • 3 - I modified routers/web/admin/users.go, added routers/web/admin/account_request.go, updated routers/web/web.go, and updated templates/admin/user/edit.tmpl so administrators can see the account request status for a user and explicitly activate, reject, or unblock requests from the admin user edit page.
  • 4 - I modified services/mailer/mail_user.go, added the new account request mail templates, updated options/locale/locale_en-US.json, and modified services/user/user.go with services/cron/tasks_extended.go so the workflow now sends dedicated validation, approval, and rejection emails, preserves rejected or blocked accounts from inactive-user cleanup, and automatically deletes only expired requests that never completed email validation.

11 - [2026-04-16 23:18:45] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Added the missing admin dashboard translation entries for the expired account request cleanup cron task.

  • 1 - I modified options/locale/locale_en-US.json to add admin.dashboard.delete_expired_account_requests so the new cron task can be rendered correctly in the admin dashboard task list.
  • 2 - I added admin.dashboard.delete_expired_account_requests.started alongside it so the matching task start message is also available and the cron task follows the same translation pattern as the existing dashboard tasks.
  • 3 - I verified the locale file remains valid JSON after the change.

12 - [2026-04-17 00:05:29] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Hardened the account request validation email flow so manual approval registrations do not silently skip or hide validation mail failures.

  • 1 - I modified routers/web/auth/auth.go so the RegisterManualConfirm path now runs before the generic activation shortcut for normal self-registrations, while still preserving the first-user bootstrap exception.
  • 2 - I modified services/mailer/mail_user.go so account request validation, approval, and rejection emails now return explicit errors when their templates cannot be rendered instead of failing silently.
  • 3 - I modified routers/web/auth/account_request.go and routers/web/admin/account_request.go so resend and unblock flows now surface validation-email rendering failures immediately, while approval and rejection actions log mail errors without rolling back the already completed admin decision.
  • 4 - I verified the updated flow builds cleanly after formatting with compile-only Go tests on the touched packages.

13 - [2026-04-17 00:53:04] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Reworked the first-user bootstrap path so manual confirmation sends the validation email instead of bypassing the new account request flow.

  • 1 - I modified routers/web/auth/auth.go so the automatic first-user admin bootstrap now only bypasses email handling when manual confirmation is disabled, while manual-confirm registrations still go through the validation email path.
  • 2 - I modified routers/web/auth/account_request.go so when the validated account is the only user in the instance, the system activates it directly and grants admin rights immediately instead of sending it into an impossible admin-review deadlock.
  • 3 - I preserved the normal staged workflow for all non-bootstrap registrations, so other users still go from email validation to pending admin review as before.
  • 4 - I formatted the code and verified the touched packages with compile-only Go tests after the bootstrap flow change.

14 - [2026-04-17 01:14:35] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Added - Added an admin-side validation email send indicator with success or failure icon and attempt timestamp.

  • 1 - I modified models/user/account_request.go to persist the last validation email attempt status and timestamp for each account request.
  • 2 - I modified routers/web/auth/auth.go, routers/web/auth/account_request.go, and routers/web/admin/account_request.go so initial send, resend, and unblock flows now record whether the validation email send function returned success or error.
  • 3 - I modified routers/web/admin/account_request.go and templates/admin/user/edit.tmpl so the account request panel in the admin user edit page now shows a or together with the last validation email attempt timestamp.
  • 4 - I updated options/locale/locale_en-US.json, validated the JSON file, formatted the code, and verified the touched packages with compile-only Go tests.

15 - [2026-04-17 06:26:17] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Extended the validation email attempt indicator so it is visible in the user-facing registration flow as well as in the admin account request panel.

  • 1 - I modified routers/web/auth/account_request.go and routers/web/auth/auth.go so the last validation email attempt status and timestamp are loaded into the user-facing signup retry and activation prompt pages.
  • 2 - I modified templates/user/auth/signup_inner.tmpl so the or indicator and timestamp now appear next to the pending request message and beside the Resend button area.
  • 3 - I modified templates/user/auth/activate_prompt.tmpl so the same indicator and timestamp now appear after the initial validation email attempt triggered by account creation.
  • 4 - I adjusted templates/admin/user/edit.tmpl so the admin panel also shows the indicator when there is mail-attempt data even if the current account request status line is otherwise absent.

16 - [2026-04-17 07:05:39] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Switched the account request validation email to a real synchronous send path and added logging for silent mail queue enqueue failures.

  • 1 - I modified services/mailer/mail_user.go so SendAccountRequestValidationMail now uses a synchronous sender path instead of only enqueueing the message asynchronously.
  • 2 - I modified services/mailer/mailer.go to add SendImmediately, which uses the initialized configured sender directly and returns the real SMTP or sendmail error back to the caller.
  • 3 - I modified services/mailer/mailer.go so SendAsync now logs queue initialization and enqueue failures instead of silently discarding them.
  • 4 - This makes the new-user validation mail behave much closer to SendTestMail, which was already using direct sending and was one likely reason test emails succeeded while queued validation emails still appeared to disappear.

17 - [2026-04-17 08:20:46] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Switched the remaining user-facing activation emails to synchronous delivery and stopped showing success when the actual send fails.

  • 1 - I modified services/mailer/mail_user.go so SendActivateAccountMail and SendActivateEmailMail now return real errors and use direct synchronous sending instead of only queueing the message.
  • 2 - I modified services/mailer/mail_user.go so account request approval and rejection emails sent to the user now use the same synchronous delivery path for consistent behavior.
  • 3 - I modified routers/web/auth/auth.go and routers/web/user/setting/account.go so signup and email-confirmation flows stop reporting success when the mail send to the user fails.
  • 4 - I modified routers/web/admin/users.go so administrator-triggered account activation now logs and warns when the activation email to the user could not be sent.

18 - [2026-04-17 18:54:53] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Refined the account request resend UX so pending users can retry from both activation and signup pages without losing their entered registration data.

  • 1 - I modified templates/user/auth/activate_prompt.tmpl so the activation page now shows a separate Did not receive the email? prompt, a standalone Resend button under the mail status indicator, and a Spam/Junk reminder.
  • 2 - I modified templates/user/auth/signup_inner.tmpl so the pending-registration panel now uses plain prompt text plus a dedicated Resend button instead of the combined button label, while also preserving the signup form values through the resend action.
  • 3 - I modified models/user/account_request.go and routers/web/auth/account_request.go so account request validation emails now track up to five resend actions and automatically hide the resend button after that limit is reached.
  • 4 - I modified routers/web/auth/auth.go and options/locale/locale_en-US.json so the activation prompt receives the same resend controls immediately after registration and the new texts are available consistently across both user-facing flows.

19 - [2026-04-17 22:10:39] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Prevented invalid signup email input from triggering an internal server error in the account request pre-check flow.

  • 1 - I modified models/user/account_request.go so GetUserByAnyEmail now trims and validates the email address before querying, reusing the normal email validation behavior instead of treating malformed input like a server-side lookup problem.
  • 2 - I modified routers/web/auth/account_request.go so the signup pre-check now treats invalid or unsupported email formats as normal invalid input and lets the standard registration validation flow handle the user-facing error message.
  • 3 - I modified routers/web/auth/account_request.go so the resend endpoint also treats malformed email input as unavailable instead of escalating it into a 500 error.

20 - [2026-04-17 23:13:17] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Rolled back newly created self-registration accounts when the initial confirmation email cannot actually be sent.

  • 1 - I modified routers/web/auth/auth.go so createAndHandleCreatedUser now passes the template and form context into the post-create flow, allowing failed registration emails to return a normal form error instead of a 500 page.
  • 2 - I modified routers/web/auth/auth.go so the initial account-request validation mail and the initial standard activation mail both delete the newly created user if sending fails, preventing orphaned accounts from being left in the database.
  • 3 - I added a dedicated auth.confirmation_mail_failed user-facing message in options/locale/locale_en-US.json so registration now tells the user that the account was not created because the confirmation email could not be sent.
  • 4 - I preserved the existing resend behavior for already created inactive users, so the rollback applies only to the first mail send during new self-registration.

21 - [2026-04-26 22:55:56] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Updated the smart build script for PNPM 10 and the repository frontend build flow.

  • 1 - I modified smart-build.sh to remove the unsupported --ignore-engines PNPM option from dependency installation.
  • 2 - I changed the frontend rebuild step to call make frontend, matching the Gitea Makefile target instead of calling a missing pnpm run build script.
  • 3 - I fixed the architecture menu echo line so Initialization checks is no longer appended as stray shell text.

22 - [2026-04-26 23:01:28] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Made the smart build script find the local Go toolchain before running backend builds.

  • 1 - I modified smart-build.sh to prepend /usr/local/go/bin to PATH when the local Go binary exists.
  • 2 - I added an early Go availability check so the script stops with a clear message before invoking make build if Go is not installed or visible.
  • 3 - I added explicit failure handling for dependency installation and frontend asset builds so the script does not continue after a failed prerequisite step.

23 - [2026-04-26 23:20:08] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Added a smart build menu option for SQLite-enabled bindata builds.

  • 1 - I modified smart-build.sh to add a build-tag selection menu with the existing bindata build and a new bindata sqlite sqlite_unlock_notify option.
  • 2 - I changed the backend build command to use the selected tag set instead of always passing TAGS="bindata".
  • 3 - I made SQLite builds enable CGO and write artifacts with a -sqlite suffix so they are distinguishable from default bindata builds.

24 - [2026-04-27 00:18:15] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Made account request validation links robust after account data changes.

  • 1 - I modified models/user/account_request.go so account request validation codes can be stored as hashes and later accepted as a fallback when the stateless code can no longer be recalculated from current user data.
  • 2 - I modified the registration, resend, and admin unblock flows to generate one validation code, send that exact code by email, and store its hash only after the email send succeeds.
  • 3 - I cleared stored validation-code hashes when account requests are reset, validated, or approved so old validation links cannot keep working after the request leaves email validation.
  • 4 - I added focused tests for account request code verification and /user/activate handling, including the case where user data changes after the validation email is sent.

25 - [2026-04-27 00:49:34] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Corrected pending account request detection for validation links and repeated registration attempts.

  • 1 - I modified account request status detection so inactive users with validation markers are treated as pending email validation even if account_request.status is missing.
  • 2 - I added a dedicated account-request time-limit code purpose while keeping compatibility with older account-request links, preventing normal activation links from being intercepted by the account request path.
  • 3 - I moved the pending account request pre-check before generic signup form errors so repeated registration attempts show the pending-request message and resend option instead of The username is already taken.
  • 4 - I updated the pending signup message to include the email address that received the validation email and added focused tests for missing-status validation, classic activation separation, and repeated registration.

26 - [2026-04-27 01:10:03] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Restored the admin account request review flow link to the page with approval controls.

  • 1 - I modified services/mailer/mail_user.go so new account request notification emails now link directly to /-/admin/users/{id}/edit, where the Activate Request and Reject controls are rendered.
  • 2 - I added a focused mailer test to ensure future account request notifications keep pointing to the admin edit page instead of the read-only user view page.

27 - [2026-04-27 01:47:34] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Hid admin-side account deletion controls for the last active administrator.

  • 1 - I modified routers/web/admin/users.go so the admin user edit page receives IsLastAdminUser for the edited user.
  • 2 - I modified templates/admin/user/edit.tmpl so Delete User Account is replaced by the existing last-admin warning when the edited user is the only active admin.
  • 3 - I hid the admin delete confirmation modal for the last-admin case while preserving the backend DeleteUser last-admin guard as the final protection.

28 - [2026-04-27 02:06:06] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Kept last-admin account deletion actions visible but disabled.

  • 1 - I modified templates/admin/user/edit.tmpl so Delete User Account remains visible as a disabled button for the last active admin while showing the existing last-admin warning.
  • 2 - I modified templates/user/settings/account.tmpl so the self-delete confirmation button remains visible as disabled for the last active admin while showing the same warning.
  • 3 - I kept delete confirmation modals unavailable for the disabled last-admin actions so blocked actions cannot be submitted from the UI.

29 - [2026-04-27 09:12:11] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Adjusted last-admin delete warning placement and spacing.

  • 1 - I modified templates/admin/user/edit.tmpl so the last-admin warning appears above the disabled Delete User Account button with vertical spacing.
  • 2 - I modified templates/user/settings/account.tmpl so the disabled self-delete confirmation button has spacing below the warning message.

30 - [2026-04-27 09:28:16] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Restored admin edit action button alignment while keeping the last-admin warning above them.

  • 1 - I modified templates/admin/user/edit.tmpl so the last-admin warning appears above the action button row.
  • 2 - I kept Update Profile and the disabled Delete User Account button in the same button row and original order.

31 - [2026-04-27 10:07:15] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Adjusted account request resend button sizing and delivery-state feedback.

  • 1 - I modified the pending signup and activation prompt templates so the resend button is smaller, blue by default, and spaced away from the spam-folder hint.
  • 2 - I added resend result state rendering so successful sends turn the button green for five seconds and failed sends keep it red.
  • 3 - I changed the resend handler to re-render the current account-request page with a failed send message instead of showing a server-error page when email delivery fails.

32 - [2026-04-27 14:41:33] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Added - Added a build environment configuration script.

  • 1 - I added configure.sh to install and verify the system packages, Go version, Node version, pnpm version, and frontend dependencies required by this Gitea tree.
  • 2 - I made the script read the required Go, Node, and pnpm versions from go.mod and package.json, while still allowing environment overrides.
  • 3 - I added an optional --with-cross-cgo mode that installs/configures the heavier cross-CGO toolchains needed for SQLite builds targeting linux/armv7 and windows/amd64.

33 - [2026-04-27 14:51:16] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Added an interactive run menu to the build environment configuration script.

  • 1 - I modified configure.sh so running it without arguments in an interactive terminal shows a description of what the script installs and verifies.
  • 2 - I added a run menu with Normal, With cross cgo, Verify only, and Quit options.
  • 3 - I added a --menu flag so the same interactive menu can be requested explicitly while keeping the existing command-line options for automated runs.

34 - [2026-04-27 14:59:01] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Made interactive environment verification report missing requirements without failing the menu run.

  • 1 - I modified configure.sh so the interactive Verify only menu option lists all detected missing commands and configuration issues instead of stopping at the first missing requirement.
  • 2 - I kept the direct ./configure.sh --verify-only mode strict for automated checks, returning a failure when requirements are missing.
  • 3 - I adjusted the final interactive verification message so it recommends rerunning the menu with Normal or With cross cgo instead of suggesting a build when requirements are still missing.

35 - [2026-04-27 15:20:01] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Translated the build environment configuration script text to English.

  • 1 - I modified configure.sh so the interactive description is written in English.
  • 2 - I translated the interactive menu option descriptions to English while keeping the existing script behavior unchanged.

36 - [2026-04-27 19:28:55] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Moved test email feedback inline and aligned mail action button states.

  • 1 - I modified routers/web/admin/config.go so the test email result redirects back to the config page with local test-mail state instead of using the global flash alert.
  • 2 - I modified templates/admin/config.tmpl so the test email result appears beside the Send button, with the button using primary, green, or red state colors.
  • 3 - I changed the account request Resend button default state from blue to primary so it uses the same visible blue styling as the rest of the Gitea UI.

37 - [2026-04-27 19:56:31] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Forced mail action button colors and refreshed local template bindata.

  • 1 - I modified the admin test mail and account request resend templates so their default, success, and failure colors are set directly with Gitea theme variables.
  • 2 - I updated the success timeout scripts to restore the direct primary-color styling after five seconds.
  • 3 - I regenerated the local ignored modules/templates/bindata.dat file so local bindata builds can include the updated templates.

38 - [2026-04-27 20:05:18] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Added bindata freshness checks to the smart build script.

  • 1 - I modified smart-build.sh so bindata builds check the generated templates, options, public, and migration schema bindata files before compilation.
  • 2 - I made the script regenerate any missing or stale bindata file with go generate -tags bindata before running make build.
  • 3 - I kept the regeneration step neutral from cross-build environment variables by clearing GOOS, GOARCH, CGO_ENABLED, and CC for the go generate command.

39 - [2026-04-27 20:35:07] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Preserved scroll position after sending a test email from the admin config page.

  • 1 - I modified templates/admin/config.tmpl so the test email form records the current scroll position before submit.
  • 2 - I modified routers/web/admin/config.go so the test email redirect carries the saved scroll position and returns to the local test-email anchor.
  • 3 - I regenerated the local ignored modules/templates/bindata.dat file so bindata builds can include the scroll-preserving template update.

40 - [2026-04-27 21:03:25] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Removed page reload and scroll movement from the admin test email action.

  • 1 - I modified templates/admin/config.tmpl so the Send Testing Email form submits through fetch and updates the inline message without changing the page URL or scroll position.
  • 2 - I modified routers/web/admin/config.go so inline test email requests return JSON state and message data instead of redirecting.
  • 3 - I regenerated the local ignored modules/templates/bindata.dat file so bindata builds can include the no-jump test email behavior.

41 - [2026-04-27 21:14:20] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Shortened admin test email delivery error messages.

  • 1 - I modified routers/web/admin/config.go so Send Testing Email displays a concise SMTP failure reason instead of the full command chain.
  • 2 - I added normalization for common mail errors such as user unknown, mailbox unavailable, relay access denied, and authentication failure.
  • 3 - I added a focused unit test for the short test mail error formatter.

42 - [2026-04-27 21:47:26] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Added - Added an admin user-list delete account action.

  • 1 - I modified templates/admin/user/list.tmpl so each user row now shows a red trash icon beside the existing User Details and Edit actions.
  • 2 - I added a shared delete-account confirmation modal on the user management list, including the existing purge option and delete-account warning text.
  • 3 - I regenerated the local ignored modules/templates/bindata.dat file so bindata builds can include the new list action.

43 - [2026-04-27 22:17:13] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Modified - Matched the admin user-list delete action to the edit-page delete state.

  • 1 - I modified routers/web/explore/user.go so user search pages can receive optional per-user extra data before rendering.
  • 2 - I modified routers/web/admin/users.go so the admin user list marks rows where the user is the last active administrator using the same condition as the edit page.
  • 3 - I modified templates/admin/user/list.tmpl so the trash icon is disabled with the existing last-admin warning tooltip whenever the edit-page Delete User Account button would be disabled.

44 - [2026-04-28 09:12:49] - v.1.27.0-dev-43-gb2b024d0b6 - Type: Fixed - Blocked inactive account-request users from getting a signed-in session.

  • 1 - I modified the password sign-in flow so inactive account-request users are stopped before session, 2FA, or remember-cookie creation and are shown the activation prompt instead.
  • 2 - I added account-request login prompts for pending email validation, pending admin review, rejected, and blocked states, while keeping the resend button available only for pending email validation.
  • 3 - I modified existing inactive signed sessions on web pages to be signed out before rendering the activation/account-request prompt so the account menu and Sign Out action are not shown.
  • 4 - I added targeted auth tests for pending email validation and pending admin review login attempts, including username and email login for the validation case.
  • 5 - I regenerated the local ignored modules/options/bindata.dat file so bindata builds can include the new login prompt locale string.

45 - [2026-04-28 16:01:28] - v1.27.0-dev-47-gf21b6b7a3b - Type: Modified - Added password confirmation to account recovery.

  • 1 - I modified templates/user/auth/reset_passwd.tmpl so the account recovery reset form includes a required Confirm Password field.
  • 2 - I modified routers/web/auth/password.go so reset submissions reject mismatched passwords before two-factor checks or password updates.
  • 3 - I added a focused auth test for mismatched recovery password confirmation and regenerated the local ignored modules/templates/bindata.dat file for bindata builds.

46 - [2026-04-28 19:05:06] - v1.27.0-dev-48-g25a1d84c2e - Type: Fixed - Used the reset-password lifetime for account recovery codes.

  • 1 - I modified models/user/user.go so reset-password time-limit codes are generated and verified with RESET_PASSWD_CODE_LIVE_MINUTES instead of ACTIVE_CODE_LIVE_MINUTES.
  • 2 - I kept activation, email activation, and account-request time-limit codes on the existing active-code lifetime.
  • 3 - I added a focused user-model test that proves reset-password codes remain valid when only RESET_PASSWD_CODE_LIVE_MINUTES allows them.

47 - [2026-04-28 20:31:34] - v1.27.0-dev-48-g25a1d84c2e - Type: Added - Added admin-created account invitation flow when registration is disabled.

  • 1 - I modified admin user creation so DISABLE_REGISTRATION = true creates inactive, sign-in-prohibited accounts and checks Send User Registration Notification by default when mail is configured.
  • 2 - I added a 24-hour admin invitation token and email template that lets the invited user accept the account, activate the email, and clear Disable Sign-In.
  • 3 - I added targeted tests for invitation token lifetime, invitation acceptance, and disabled-registration admin account creation defaults, then regenerated local ignored template and options bindata.

48 - [2026-04-28 21:56:08] - v1.27.0-dev-48-g25a1d84c2e - Type: Modified - Added smart-build load profile options.

  • 1 - I modified smart-build.sh so it asks for a build load profile before dependency checks, frontend build, bindata generation, and Go compilation.
  • 2 - I added Moderate and Low Resource profiles that set GOMAXPROCS, MAKEFLAGS=-j1, and a conservative Node memory limit to reduce CPU and RAM pressure.
  • 3 - I kept the Normal profile available for the existing unrestricted build behavior.

49 - [2026-04-28 23:00:25] - v1.27.0-dev-49-g20405fe5e7 - Type: Added - Notified inviting admins when admin-created invitations are accepted.

  • 1 - I stored the creator admin ID on disabled-registration admin-created invitation accounts so the invitation acceptance flow knows who to notify.
  • 2 - I added an invitation-accepted email template and mailer function that sends the accepting user's details back to the admin who created the account.
  • 3 - I updated targeted admin/auth tests and regenerated local ignored template and options bindata for the new email template and locale strings.

50 - [2026-04-28 23:52:04] - v1.27.0-dev-50-g8147f7a798 - Type: Modified - Added creator-admin badges to the admin users list.

  • 1 - I modified the admin user list data loader so users created through the disabled-registration invitation flow include the admin creator name.
  • 2 - I modified templates/admin/user/list.tmpl so the Created column shows a by <admin> mini badge next to the creation date when creator data exists.
  • 3 - I added a focused admin list test for the creator-admin mapping and regenerated local ignored template bindata.

51 - [2026-04-29 01:55:04] - v1.27.0-dev-51-gcfd7cfa1dc - Type: Fixed - Kept creator-admin badges permanently attached to invited accounts.

  • 1 - I modified the admin invitation acceptance notification flow so it no longer deletes the stored creator-admin ID.
  • 2 - I updated the invitation acceptance test to assert the creator-admin marker remains after the user accepts the invitation.

52 - [2026-04-29 02:04:41] - v1.27.0-dev-52-gcd96c721e0 - Type: Modified - Added persistent admin email tooltip to creator badges.

  • 1 - I modified admin-created invitation account storage so it permanently saves the creator admin ID, username, and email address.
  • 2 - I modified the admin users list creator badge so it shows by <admin> and exposes the stored admin email as a hover tooltip.
  • 3 - I updated the focused admin list tests to prove the badge data still renders from stored name/email even without looking up the admin account, then regenerated local ignored template bindata.

53 - [2026-04-29 02:30:55] - v1.27.0-dev-52-gcd96c721e0 - Type: Modified - Added admin activation badges and first-admin GOOD badge.

  • 1 - I modified the admin users list so the Activated column can show a by <admin> badge with the stored admin email as a hover tooltip.
  • 2 - I stored admin activation ID, username, and email address when account requests are approved or inactive users are manually activated by an admin.
  • 3 - I added the special by GOOD Created-column badge for the first admin account, updated focused admin list tests, and regenerated local ignored template bindata.

54 - [2026-04-29 08:25:36] - v1.27.0-dev-53-ga3e09bb819 - Type: Fixed - Prevented empty by badges in the admin users list.

  • 1 - I changed the admin users list badge maps to use pointer values so missing entries render as empty instead of truthy zero-value structs.
  • 2 - I guarded the Created and Activated badge rendering so badges only appear when a display name exists.
  • 3 - I reran the focused admin badge tests and regenerated local ignored template bindata.

55 - [2026-04-29 09:02:42] - v1.27.0-dev-53-ga3e09bb819 - Type: Modified - Moved account request review controls to the top of the admin user edit panel.

  • 1 - I moved the account request status message to the top of the admin user edit segment, immediately under the panel header.
  • 2 - I moved the Activate/Reject/Unblock request controls above the profile edit form so admins can review pending accounts without scrolling down.
  • 3 - I regenerated local ignored template bindata for the updated admin user edit template.

56 - [2026-04-29 09:32:09] - v1.27.0-dev-54-gc7c7af77a1 - Type: Modified - Defaulted admin user purge checkboxes to enabled.

  • 1 - I set the Purge User checkbox to checked by default in the admin user edit delete modal.
  • 2 - I set the Purge User checkbox to checked by default in the admin users list delete modal.
  • 3 - I regenerated local ignored template bindata for the updated admin templates.

57 - [2026-04-29 09:53:08] - v1.27.0-dev-55-ga8d9e5e659 - Type: Added - Added Disable Sign-In metadata to the admin users list.

  • 1 - I added persistent admin metadata for Disable Sign-In actions, including timestamp, admin ID, admin name, and admin email.
  • 2 - I added a Disable Sign-In column to the admin users list that displays the block date and by <admin> badge with email tooltip.
  • 3 - I stored the same metadata when admin-created invitation accounts start disabled, when an admin disables sign-in from the edit form, and when an account request is rejected.

58 - [2026-04-29 10:09:41] - v1.27.0-dev-55-ga8d9e5e659 - Type: Modified - Added inactive marker to the Disable Sign-In admin users column.

  • 1 - I changed the Disable Sign-In column so users without sign-in disabled show the same octicon-x marker style as the other status columns.
  • 2 - I kept the block date and by <admin> badge for users that do have Disable Sign-In metadata.
  • 3 - I regenerated local ignored template bindata for the updated admin users list template.

59 - [2026-04-29 14:49:39] - v1.27.0-dev-56-g1dcd81b420 - Type: Added - Added admin status-change reasons and user email notifications.

  • 1 - I added reason fields under the admin edit checkboxes for account activation, Disable Sign-In, and restricted status.
  • 2 - I require a reason when an admin newly deactivates an account, enables Disable Sign-In, or enables restricted mode, then email the user with the action, admin name, and reason.
  • 3 - I added the status-change email template, locale strings, regenerated local ignored template/options bindata, and reran the focused admin tests.

60 - [2026-04-29 19:01:39] - v1.27.0-dev-57-g210955465e - Type: Fixed - Corrected admin status reason behavior and reactivation emails.

  • 1 - I changed the admin edit form so reason fields belong to the existing checkboxes and only appear for the restrictive state of each checkbox.
  • 2 - I persisted the deactivation, Disable Sign-In, and restricted reasons in user settings so later administrators can see the saved reason.
  • 3 - I changed status-change emails to describe the actual account effect, added notifications when restrictions are lifted, and stopped sending the old activation email on admin reactivation.

61 - [2026-04-29 19:56:22] - v1.27.0-dev-59-gb3204f3db6 - Type: Added - Added restricted-admin badges and reason actor badges.

  • 1 - I added persistent admin metadata for Restricted actions, including timestamp, admin ID, admin name, and admin email.
  • 2 - I changed the admin users list Restricted column so newly restricted users show the restriction date and by <admin> badge with email tooltip.
  • 3 - I added by <admin> badges next to the saved Reason labels in the admin user edit panel for deactivation, Disable Sign-In, and Restricted reasons.

62 - [2026-04-29 21:00:30] - v1.27.0-dev-60-g396b15372d - Type: Added - Added Is Administrator reason and admin-grant badges.

  • 1 - I added persistent metadata for granting administrator privileges, including timestamp, admin ID, admin name, admin email, and reason.
  • 2 - I changed the admin users list so administrator accounts with grant metadata show an Admin by <admin> badge with email tooltip.
  • 3 - I added the Is Administrator reason field, reason actor badge, grant/revoke email notifications, regenerated local ignored bindata, and added focused admin grant tests.

63 - [2026-04-29 21:30:55] - v1.27.0-dev-60-g396b15372d - Type: Fixed - Made Is Administrator reasons apply only when admin rights are revoked.

  • 1 - I changed the Is Administrator reason field so it appears only when the checkbox is unchecked.
  • 2 - I stopped requiring or sending a reason when administrator privileges are granted and changed that email to a congratulatory promotion message.
  • 3 - I kept the reason on administrator privilege removal, regenerated template/options bindata, and reran the focused admin grant tests.

64 - [2026-04-29 22:03:18] - v1.27.0-dev-61-g067a09c2ac - Type: Fixed - Disabled critical self-edit account state checkboxes.

  • 1 - I disabled User Account Is Activated and Is Restricted when an administrator edits their own account, matching the existing self-edit protection for Disable Sign-In.
  • 2 - I hardened the admin user update handler so manually submitted self-edit forms cannot change the current admin's active, restricted, or prohibit-login state.
  • 3 - I regenerated local ignored template bindata and verified the admin package compilation with reduced build pressure.

65 - [2026-04-29 22:37:56] - v1.27.0-dev-62-g3afb4e8afa - Type: Added - Added Codex ChatGPT login helper script.

  • 1 - I added .codex_gpt_login, an interactive helper for completing the local Codex ChatGPT auth callback in code-server environments.
  • 2 - The script accepts either a raw received code or a full URL/query containing code=..., calls the local callback endpoint, extracts id_token, and completes the /success request.
  • 3 - I made the script executable and verified its shell syntax with bash -n.

66 - [2026-04-29 22:55:08] - v1.27.0-dev-62-g3afb4e8afa - Type: Modified - Added admin actor badge beside the Is Administrator option.

  • 1 - I updated the admin user edit panel so the Is Administrator checkbox label shows by <admin> when administrator grant metadata exists.
  • 2 - I reused the stored admin email as the badge hover tooltip and regenerated local ignored template bindata.

67 - [2026-04-30 00:30:40] - v1.27.0-dev-63-g4aacf3bd20 - Type: Fixed - Hid Is Administrator reason unless admin rights were revoked.

  • 1 - I changed the Is Administrator reason field so normal non-admin users do not see it just because the checkbox is unchecked.
  • 2 - The reason field now appears only when a saved admin-revocation reason exists or when an existing administrator is being unchecked during the current edit.
  • 3 - I regenerated local ignored template bindata and verified whitespace with git diff --check.

68 - [2026-04-30 01:44:17] - v1.27.0-dev-64-gcff1b46f50 - Type: Added - Added persistent super administrator protection.

  • 1 - I added SUPER_ADMIN_ENABLED and ADMIN_MANAGEMENT_POLICY configuration options for administrator permission management.
  • 2 - I stored the super administrator role and grant/revoke metadata in persistent user settings, with automatic by GOOD bootstrap for the first active admin.
  • 3 - I protected administrator and super administrator changes so regular admins cannot alter existing admins unless the selected policy allows a regular-user promotion.
  • 4 - I added super administrator badges, reason tracking, and status-change emails, then regenerated template and options bindata.

69 - [2026-04-30 02:20:26] - v1.27.0-dev-64-gcff1b46f50 - Type: Fixed - Enabled super administrator bootstrap by default.

  • 1 - I changed SUPER_ADMIN_ENABLED to default to true so existing installations without the new app.ini key bootstrap the first active administrator automatically.
  • 2 - I updated the app.ini example to document the enabled default and kept SUPER_ADMIN_ENABLED = false available as the explicit opt-out.
  • 3 - I made the super administrator list badge fall back to by GOOD for the bootstrapped first administrator and regenerated options bindata.

70 - [2026-04-30 04:08:23] - v1.27.0-dev-66-g35b9fa65d3 - Type: Fixed - Blocked regular administrators from editing super administrator accounts.

  • 1 - I modified routers/web/admin/users.go so non-super-admins are redirected away from super-admin edit actions, including profile edits and avatar changes.
  • 2 - I modified routers/api/v1/admin/user.go so the admin user edit API now returns forbidden when a regular admin targets a super admin.
  • 3 - I modified templates/admin/user/list.tmpl and templates/admin/user/view.tmpl so edit actions are hidden for super-admin accounts when the acting admin is not also a super admin.
  • 4 - I added TestAdminCannotEditSuperAdminUser in tests/integration/admin_user_test.go to cover the denied web-edit flow.

71 - [2026-04-30 04:19:14] - v1.27.0-dev-67-g0fc6f30a30 - Type: Modified - Kept super administrator Edit and Delete controls visible but disabled for regular admins.

  • 1 - I modified templates/admin/user/list.tmpl so super-admin rows still show the Edit and Delete icons for regular admins, but as disabled muted controls with the super-admin-required tooltip.
  • 2 - I modified templates/admin/user/view.tmpl so the Edit button remains visible on the super-admin user details page for regular admins, but in a disabled state.

72 - [2026-04-30 04:58:16] - v1.27.0-dev-68-g5da24d2c7b - Type: Modified - Protected GOOD-granted admin accounts and blocked deleting the direct grantor.

  • 1 - I added models/user/admin_grant.go with helpers to read admin and super-admin grantor metadata, detect by GOOD bootstrap grants, and check whether a target user is the direct grantor of another admin.
  • 2 - I modified routers/web/admin/users.go so GOOD-granted accounts cannot be edited or deleted through admin actions, and regular admins may delete other admin accounts except their direct grantor and protected super-admin cases.
  • 3 - I modified routers/api/v1/admin/user.go so the admin API now enforces the same GOOD-protection and direct-grantor deletion rule.
  • 4 - I added locale messages for the new admin restrictions and added focused integration coverage for deleting another admin versus the direct grantor, plus GOOD-protected admin API edits.

73 - [2026-04-30 16:51:42] - v1.27.0-dev-71-g80497e4194 - Type: Modified - Restored normal self-edit access for super admins and disabled only the admin actions that are truly forbidden.

  • 1 - I modified routers/web/admin/users.go so a GOOD-granted or super-admin user can still edit their own ordinary account fields, while forbidden cross-user edits remain blocked and table action states are computed per target user.
  • 2 - I modified routers/api/v1/admin/user.go so GOOD-protection no longer blocks a user from editing their own account through the admin API.
  • 3 - I modified templates/admin/user/list.tmpl, templates/admin/user/view.tmpl, and templates/admin/user/edit.tmpl so Edit stays enabled for allowed self-edits, while forbidden Edit and Delete actions are shown disabled with the specific reason tooltip or warning message.

74 - [2026-04-30 20:11:48] - v1.27.0-dev-72-g43161732e3 - Type: Modified - Added install-time admin management policy choices with direct-grantor and inherited-grantor enforcement.

  • 1 - I modified modules/setting/admin.go, services/forms/user_form.go, routers/install/install.go, templates/install.tmpl, and options/locale/locale_en-US.json so installation now exposes three administrator-management policies: super_admin_only, grantor_only, and grantor_inheritance, while normalizing the old legacy policy names.
  • 2 - I modified models/user/admin_grant.go so the code can resolve the effective admin grantor by walking the admin-grant chain until it finds an active administrator who still has sign-in enabled.
  • 3 - I modified routers/web/admin/users.go so regular admins can edit or delete only the administrator accounts allowed by the selected policy, while keeping super-admin protections, GOOD protections, self-edit exceptions, and disabled forbidden actions intact in the admin UI.
  • 4 - I modified routers/api/v1/admin/user.go so the admin API now applies the same grantor-based restrictions for editing and deleting administrator accounts.
  • 5 - I added focused integration coverage in tests/integration/admin_user_test.go and tests/integration/api_admin_test.go for direct-grantor edits, inherited-grantor edits, and API denial for unrelated admins.

75 - [2026-04-30 20:37:01] - v1.27.0-dev-72-g43161732e3 - Type: Modified - Updated the example app.ini documentation for the new administrator management policies.

  • 1 - I modified custom/conf/app.example.ini so the ADMIN_MANAGEMENT_POLICY comments now document super_admin_only, grantor_only, and grantor_inheritance, and changed the documented default to grantor_only.