BigW Consortium Gitlab

  1. 08 Feb, 2017 1 commit
  2. 07 Feb, 2017 1 commit
  3. 06 Feb, 2017 2 commits
  4. 25 Jan, 2017 1 commit
  5. 24 Jan, 2017 1 commit
  6. 08 Jan, 2017 1 commit
    • Remove the project_authorizations.id column · de321fbb
      Yorick Peterse authored
      This column used to be a 32 bits integer, allowing for only a maximum of
      2 147 483 647 rows. Given enough users one can hit this limit pretty
      quickly, as was the case for GitLab.com.
      
      Changing this type to bigint (= 64 bits) would give us more space, but
      we'd eventually hit the same limit given enough users and projects. A
      much more sustainable solution is to simply drop the "id" column.
      
      There were only 2 lines of code depending on this column being present,
      and neither truly required it to be present. Instead the code now uses
      the "project_id" column combined with the "user_id" column. This means
      that instead of something like this:
      
          DELETE FROM project_authorizations
          WHERE user_id = X
          AND id = Y;
      
      We now run the following when removing rows:
      
          DELETE FROM project_authorizations
          WHERE user_id = X
          AND project_id = Y;
      
      Since both user_id and project_id are indexed this should not slow down
      the DELETE query.
      
      This commit also removes the "dependent: destroy" clause from the
      "project_authorizations" relation in the User and Project models.
      Keeping this prevents Rails from being able to remove data as it relies
      on an "id" column being present. Since the "project_authorizations"
      table has proper foreign keys set up (with cascading removals) we don't
      need to depend on any Rails logic.
  7. 03 Jan, 2017 2 commits
    • Fix cross-project references copy to include the project reference · 112f4705
      James Lopez authored
      Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
    • Add email and password confirmation fields to registration form · 33b41bc8
      Drew Blessing authored
      It's too easy to mistype an email or password when signing up.
      The support team is receiving an increasing number of requests
      because users mistype their email. We can eliminate this problem
      by requiring users to confirm the email before registering. The
      same issue can occur for the password field so we should add
      this, too. We should note that password confirmation is part
      of the default Devise forms. I don't know why/when GitLab
      removed it.
  8. 19 Dec, 2016 1 commit
    • Smarter refreshing of authorized projects · f73193c3
      Yorick Peterse authored
      Prior to this commit the refreshing of authorized projects was done in
      two steps:
      
      1. Remove existing authorizations
      2. Insert a new list of all authorizations
      
      This can lead to a high amount of dead tuples as every time all rows are
      being replaced. For example, if a user with 100 authorizations is given
      access to a new project this would lead to:
      
      * 100 rows being removed
      * 101 new rows being inserted
      
      This commit changes the way this system works so it only removes/inserts
      what is necessary. Using the above example this would lead to only 1 new
      row being inserted, with the initial 100 being left untouched.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/25257
  9. 18 Dec, 2016 1 commit
  10. 16 Dec, 2016 2 commits
  11. 13 Dec, 2016 1 commit
  12. 01 Dec, 2016 1 commit
  13. 25 Nov, 2016 1 commit
    • Refresh project authorizations using a Redis lease · 92b2c74c
      Yorick Peterse authored
      When I proposed using serializable transactions I was hoping we would be
      able to refresh data of individual users concurrently. Unfortunately
      upon closer inspection it was revealed this was not the case. This could
      result in a lot of queries failing due to serialization errors,
      overloading the database in the process (given enough workers trying to
      update the target table).
      
      To work around this we're now using a Redis lease that is cancelled upon
      completion. This ensures we can update the data of different users
      concurrently without overloading the database.
      
      The code will try to obtain the lease until it succeeds, waiting at
      least 1 second between retries. This is necessary as we may otherwise
      end up _not_ updating the data which is not an option.
  14. 23 Nov, 2016 3 commits
  15. 18 Nov, 2016 2 commits
  16. 17 Nov, 2016 2 commits
  17. 16 Nov, 2016 3 commits
  18. 07 Nov, 2016 3 commits
  19. 04 Nov, 2016 1 commit
  20. 01 Nov, 2016 1 commit
    • Allow to search for user by secondary email address in the admin interface · f8530580
      Yar authored
      It is not possible to search for a user by his secondary email address in
      the Users search bar in the admin interface(/admin/users). A use-case could
       be that an admin wants to remove a specific secondary email address of an
      user, because it interferes with another user. Issue #23761
      
      This commit adds ability to search not only by main email, but also
      by any secondary email in the admin interface.
  21. 27 Oct, 2016 1 commit
    • Only show one error message for an invalid email · 36ec5eaf
      Steve Halasz authored
      If notification_email is blank, it's set from email. If an admin
      attempted to create a user with an invalid email, an error would be
      displayed for both fields. Only validate the notification_email if it's
      different from email.
  22. 25 Oct, 2016 1 commit
    • Fix `User#to_reference` · fed3f718
      Timothy Andrew authored
      1. Changes in 8.13 require `Referable`s that don't have a project
         reference to accept two arguments - `from_project` and
         `target_project`.
      
      2. `User#to_reference` was not changed to accept the
         `target_project` (even though it is not used). Moving an issue
         containing a user reference would throw a "invalid number of
         arguments" exception.
      
      Fixes #23662
  23. 24 Oct, 2016 1 commit
  24. 11 Oct, 2016 1 commit
  25. 07 Oct, 2016 1 commit
  26. 05 Oct, 2016 1 commit
    • Refactor Gitlab::Identifier · 16ed9b61
      Yorick Peterse authored
      This refactors Gitlab::Identifier so it uses fewer queries and is
      actually tested. Queries are reduced by caching the output as well as
      using 1 query (instead of 2) to find a user using an SSH key.
  27. 04 Oct, 2016 1 commit
    • Restrict failed login attempts for users with 2FA · 194fbc3c
      Sean McGivern authored
      Copy logic from `Devise::Models::Lockable#valid_for_authentication?`, as
      our custom login flow with two pages doesn't call this method. This will
      increment the failed login counter, and lock the user's account once
      they exceed the number of failed attempts.
      
      Also ensure that users who are locked can't continue to submit 2FA
      codes.
  28. 15 Sep, 2016 2 commits