Skip to content
Snippets Groups Projects

Fix Logic issues on Fresh Install Detect

Merged Andrew requested to merge bug/pretzel-fresh-install into dev

What does this MR do and why?

Currently fresh installs are detected when checking for a user with ID 1. As that increments if an end user deletes the Admin account instead of renaming it there will never be another user with ID 1. This will cause Crafty to always think it is a fresh install and get a unique constraint failed when trying to add a new admin user at a different ID over and over and over again.

How to set up and validate locally

In 4.0.9:

  1. Start Crafty
  2. Add a new user and make them an SU
  3. Log in as that new user and delete the admin account (You must remove their su access first)
  4. Stop Crafty. Start it a few more times and it will crash.

In this branch:

  1. Start Crafty
  2. Add a new user and make them an SU
  3. Log in as that new user and delete the admin account (You must remove their su access first)
  4. Stop Crafty. Start it a few more times and it will not crash.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • Have you checked this doesn't interfere/conflict/duplicate someone elses work?
  • Have you fully tested your changes?
  • Have you resolved any lint issues?
  • Have you assigned a reviewer?
  • Have you applied correct labels?
Edited by Iain Powrie

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading