1. 06 Apr, 2017 12 commits
    • Timothy Andrew's avatar
      Move a user's award emoji to the ghost user · f3a543bd
      Timothy Andrew authored
      ... when the user is destroyed.
      
      1. Normally, for a given awardable and award emoji name, a user is only allowed
         to create a single award emoji.
      
      2. This validation needs to be removed for ghost users, since:
      
         - User A and User B have created award emoji - with the same name and against
           the same awardable
         - User A is deleted. Their award emoji is moved to the ghost user
         - User B is deleted. Their award emoji needs to be moved to the ghost user.
           However, this breaks the uniqueness validation, since the ghost user is
           only allowed to have one award emoji of a given name for a given awardable
      f3a543bd
    • Timothy Andrew's avatar
      Move a user's abuse reports to the ghost user · 5061dd7d
      Timothy Andrew authored
      ... when the user is destroyed.
      
      To clarify, this regards abuse reports that the to-be-deleted user has _reported_.
      5061dd7d
    • Timothy Andrew's avatar
      Fix a bug with the User#abuse_report association. · ffa947e8
      Timothy Andrew authored
      Introduction
      ------------
      
      1. The foreign key was not explicitly specified on the association.
      2. The `AbuseReport` model contains two references to user - `reporter_id` and
         `user_id`
      3. `user.abuse_report` is supposed to return the single abuse report where
         `user_id` refers to the given user.
      
      Bug Description
      ---------------
      
      1. `user.abuse_report` would return an abuse report where `reporter_id` referred
         to the current user, if such an abuse report was present.
      
      2. This implies a slightly more serious bug as well:
      
         - Assume User A filed an abuse report against User B
         - We have an abuse report where `reporter_id` is User A and `user_id` is User B
         - If User A is updated (`user_a.block`, for example), the abuse report would
           also be updated, such that both `reporter_id` _and_ `user_id` point to User A.
      
      Fix
      ---
      
      Explicitly declare the foreign key `user_id` in the `has_one` declaration
      ffa947e8
    • Timothy Andrew's avatar
      Move a user's notes to the ghost user · 1c1252f7
      Timothy Andrew authored
      ... when the user is destroyed.
      1c1252f7
    • Timothy Andrew's avatar
      Move a user's merge requests to the ghost user. · 546b5b83
      Timothy Andrew authored
      1. When the user is deleted.
      
      2. Refactor out code relating to "migrating records to the ghost user" into a
         `MigrateToGhostUser` concern, which is tested using a shared example.
      546b5b83
    • Stan Hu's avatar
      Merge branch 'sh-rename-geo-rake-task' into 'master' · cecdaaca
      Stan Hu authored
      Rename Rake task from geo:add_primary_node to geo:set_primary_node
      
      See merge request !1579
      cecdaaca
    • DJ Mountney's avatar
      Update CHANGELOG.md for 8.16.9 · a847bf28
      DJ Mountney authored
      [ci skip]
      a847bf28
    • DJ Mountney's avatar
      Update CHANGELOG-EE.md for 8.16.9-ee · ba805d4a
      DJ Mountney authored
      [ci skip]
      ba805d4a
    • DJ Mountney's avatar
      Update CHANGELOG.md for 8.17.5 · da81bb22
      DJ Mountney authored
      [ci skip]
      da81bb22
    • DJ Mountney's avatar
      Update CHANGELOG-EE.md for 8.17.5-ee · cdb56e9d
      DJ Mountney authored
      [ci skip]
      cdb56e9d
    • DJ Mountney's avatar
      Update CHANGELOG.md for 9.0.4 · 085a9bc3
      DJ Mountney authored
      [ci skip]
      085a9bc3
    • DJ Mountney's avatar
      Update CHANGELOG-EE.md for 9.0.4-ee · 1048fb85
      DJ Mountney authored
      [ci skip]
      1048fb85
  2. 05 Apr, 2017 28 commits