Conversation

kerwin612

This PR adds a feature to direct users to appropriate pages after system installation:

  • If no admin credentials were provided during installation, redirect to the registration page with a prominent notice about creating the first administrative account
  • If admin credentials were already set, redirect directly to the login page

4d396ad132d9b57fc4f45a62117177f1

@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging.label May 17, 2025
@github-actions-actions bot added modifies/translation modifies/goPull requests that update Go codemodifies/templatesThis PR modifies the template filesmodifies/frontend labels May 17, 2025
@kerwin612kerwin612 requested review from kemzeb and wxiaoguang May 22, 2025 08:52
@kerwin612kerwin612 requested a review from a team June 1, 2025 05:29

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't speak on frontend design, but otherwise this looks good to me.

Was iffy about the HasUsers() calls ignoring DB errors, but after further reading it seems the worst that can happen is:

  • User accesses sign up page (or completes the install config if they're on the install page)
  • A DB error occurs
  • Server sends sign up page + the sign_up_tip message to the user

@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged.and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging.labels Jun 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.and removedThis PR needs approval from one additional maintainer to be merged.labels Jun 8, 2025
@denyskondenyskon added type/enhancementAn improvement of existing functionalitytopic/ui-interactionChange the process how users use Gitea instead of the visual appearancelabels Jun 8, 2025
@wxiaoguang

And also please review admin related bug fix: Fix last admin check when syncing users #34649

@kerwin612kerwin612 requested a review from wxiaoguang June 20, 2025 12:57
@lunnylunny added this to the 1.25.0 milestone Jun 20, 2025
@lunnylunny added the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon.label Jun 20, 2025
@lunnylunny enabled auto-merge (squash) June 21, 2025 18:31
@lunnylunny merged commit 0548c10 into go-gitea:main Jun 21, 2025
26 checks passed
@GiteaBotGiteaBot removed the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon.label Jun 21, 2025
@kerwin612kerwin612 deleted the feat/redirect-after-install branch June 23, 2025 01:59
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 23, 2025
* giteaofficial/main: (22 commits)
  [skip ci] Updated translations via Crowdin
  Fix required contexts and commit status matching bug (go-gitea#34815)
  Add "Cancel workflow run" button to Actions list page (go-gitea#34817)
  Use `shallowRef` instead of `ref` in `.vue` files where possible (go-gitea#34813)
  Edit file workflow for creating a fork and proposing changes (go-gitea#34240)
  Refactor packages (go-gitea#34777)
  Refactor wiki (go-gitea#34805)
  [skip ci] Updated translations via Crowdin
  Upgrade htmx to 2.0.5 (go-gitea#34809)
  Forks repository list page follow other repositories page (go-gitea#34784)
  Add post-installation redirect based on admin account status (go-gitea#34493)
  Rework delete org and rename org UI (go-gitea#34762)
  Refactor editor (go-gitea#34780)
  Improve img lazy loading (go-gitea#34804)
  [skip ci] Updated translations via Crowdin
  Fix Feishu webhook signature verification (go-gitea#34788)
  Upgrade chi to v5.2.2 (go-gitea#34798)
  Fix the issue of abnormal interface when there is no issue-item on the project page (go-gitea#34791)
  Fix container range bug (go-gitea#34795)
  Fix OCI manifest parser (go-gitea#34797)
  ...
Sign up for free to join this conversation on . Already have an account? Sign in to comment
lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.modifies/goPull requests that update Go codemodifies/templatesThis PR modifies the template filesmodifies/translation topic/ui-interactionChange the process how users use Gitea instead of the visual appearancetype/enhancementAn improvement of existing functionality
None yet

Successfully merging this pull request may close these issues.