Skip to content
Snippets Groups Projects
  1. Oct 12, 2017
  2. Oct 05, 2017
  3. Sep 29, 2017
  4. Sep 28, 2017
  5. Aug 09, 2017
  6. Jul 27, 2017
  7. Jun 28, 2017
  8. Jun 14, 2017
  9. May 01, 2017
  10. Apr 26, 2017
    • Timothy Andrew's avatar
      Allow admins to sudo to blocked users. · 4dfdef2d
      Timothy Andrew authored
      - Currently, (for example) admins can't delete snippets for blocked users, which
        is an unexpected limitation.
      
      - We modify `authenticate!` to conduct the `access_api` policy check against the
        `initial_current_user`, instead of the user being impersonated.
      
      - Update CHANGELOG for !10842
      4dfdef2d
  11. Apr 21, 2017
  12. Mar 09, 2017
  13. Jan 19, 2017
  14. Dec 23, 2016
  15. Dec 16, 2016
    • Timothy Andrew's avatar
      Modify `ApiHelpers` spec to adhere to the Four-Phase test style. · fc7a5a38
      Timothy Andrew authored
      - Use whitespace to separate the setup, expectation and teardown phases.
      fc7a5a38
    • Timothy Andrew's avatar
      Calls to the API are checked for scope. · 7fa06ed5
      Timothy Andrew authored
      - Move the `Oauth2::AccessTokenValidationService` class to
        `AccessTokenValidationService`, since it is now being used for
        personal access token validation as well.
      
      - Each API endpoint declares the scopes it accepts (if any). Currently,
        the top level API module declares the `api` scope, and the `Users` API
        module declares the `read_user` scope (for GET requests).
      
      - Move the `find_user_by_private_token` from the API `Helpers` module to
        the `APIGuard` module, to avoid littering `Helpers` with more
        auth-related methods to support `find_user_by_private_token`
      7fa06ed5
  16. Dec 13, 2016
  17. Dec 12, 2016
  18. Dec 07, 2016
  19. Dec 01, 2016
  20. Nov 01, 2016
  21. Oct 27, 2016
  22. Sep 23, 2016
  23. Sep 19, 2016
    • Nick Thomas's avatar
      Enable Warden for the Grape API · 10c07226
      Nick Thomas authored
      The practical effect of this commit is to make the API check the Rails session
      cookie for authentication details. If the cookie is present and valid, it will
      be used to authenticate.
      
      The API now has several authentication options for users. They follow in this
      order of precedence:
      
      * Authentication token
      * Personal access token
      * OAuth2 Bearer token (Doorkeeper - application access)
      * Rails session cookie
      10c07226
  24. Aug 24, 2016
  25. Aug 09, 2016
  26. Jul 19, 2016
  27. Jul 18, 2016
  28. Jul 13, 2016
    • Robert Speicher's avatar
      Revert "Merge branch '18193-developers-can-merge' into 'master' · 530f5158
      Robert Speicher authored
      This reverts commit 9ca633eb, reversing
      changes made to fb229bbf.
      530f5158
    • Timothy Andrew's avatar
      Refactor `Gitlab::GitAccess` · 60245bbe
      Timothy Andrew authored
      1. Don't use case statements for dispatch anymore. This leads to a lot
         of duplication, and makes the logic harder to follow.
      
      2. Remove duplicated logic.
      
          - For example, the `can_push_to_branch?` exists, but we also have a
            different way of checking the same condition within `change_access_check`.
      
          - This kind of duplication is removed, and the `can_push_to_branch?`
            method is used in both places.
      
      3. Move checks returning true/false to `UserAccess`.
      
          - All public methods in `GitAccess` now return an instance of
            `GitAccessStatus`. Previously, some methods would return
            true/false as well, which was confusing.
      
          - It makes sense for these kinds of checks to be at the level of a
            user, so the `UserAccess` class was repurposed for this. The prior
            `UserAccess.allowed?` classmethod is converted into an instance
            method.
      
          - All external uses of these checks have been migrated to use the
            `UserAccess` class
      
      4. Move the "change_access_check" into a separate class.
      
          - Create the `GitAccess::ChangeAccessCheck` class to run these
            checks, which are quite substantial.
      
          - `ChangeAccessCheck` returns an instance of `GitAccessStatus` as
            well.
      
      5. Break out the boolean logic in `ChangeAccessCheck` into `if/else`
         chains - this seems more readable.
      
      6. I can understand that this might look like overkill for !4892, but I
         think this is a good opportunity to clean it up.
      
          - http://martinfowler.com/bliki/OpportunisticRefactoring.html
      60245bbe
  29. Jul 01, 2016
  30. Jun 16, 2016
  31. Apr 28, 2016
  32. Oct 23, 2015
  33. Jun 22, 2015
  34. Feb 12, 2015
Loading