1. 17 Mar, 2017 1 commit
  2. 14 Mar, 2017 2 commits
  3. 23 Feb, 2017 2 commits
  4. 27 Jan, 2017 3 commits
  5. 26 Jan, 2017 1 commit
  6. 25 Jan, 2017 1 commit
  7. 03 Jan, 2017 1 commit
  8. 15 Dec, 2016 1 commit
  9. 02 Dec, 2016 1 commit
  10. 23 Nov, 2016 1 commit
  11. 09 Nov, 2016 1 commit
  12. 20 Oct, 2016 1 commit
  13. 28 Sep, 2016 1 commit
    • Rémy Coutable's avatar
      Allow Member.add_user to handle access requesters · ec0061a9
      Rémy Coutable authored
      Changes include:
      - Ensure Member.add_user is not called directly when not necessary
      - New GroupMember.add_users_to_group to have the same abstraction level as for Project
      - Refactor Member.add_user to take a source instead of an array of members
      - Fix Rubocop offenses
      - Always use Project#add_user instead of project.team.add_user
      - Factorize users addition as members in Member.add_users_to_source
      - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects
      - Destroy any requester before adding them as a member
      - Improve the way we handle access requesters in Member.add_user
        Instead of removing the requester and creating a new member,
        we now simply accepts their access request. This way, they will
        receive a "access request granted" email.
      - Fix error that was previously silently ignored
      - Stop raising when access level is invalid in Member, let Rails validation do their work
      Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
  14. 29 Jul, 2016 1 commit
    • Yorick Peterse's avatar
      Method for returning issues readable by a user · 002ad215
      Yorick Peterse authored
      The method Ability.issues_readable_by_user takes a list of users and an
      optional user and returns an Array of issues readable by said user. This
      method in turn is used by
      Banzai::ReferenceParser::IssueParser#nodes_visible_to_user so this
      method no longer needs to get all the available abilities just to check
      if a user has the "read_issue" ability.
      To test this I benchmarked an issue with 222 comments on my development
      environment. Using these changes the time spent in nodes_visible_to_user
      was reduced from around 120 ms to around 40 ms.
  15. 20 Jul, 2016 1 commit
  16. 03 Jun, 2016 2 commits
  17. 02 Jun, 2016 1 commit
  18. 01 Jun, 2016 1 commit
    • Yorick Peterse's avatar
      Refactor Participable · 580d2501
      Yorick Peterse authored
      There are several changes to this module:
      1. The use of an explicit stack in Participable#participants
      2. Proc behaviour has been changed
      3. Batch permissions checking
      == Explicit Stack
      Participable#participants no longer uses recursion to process "self" and
      all child objects, instead it uses an Array and processes objects in
      breadth-first order. This allows us to for example create a single
      Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using
      a ReferenceExtractor removes the need for running potentially many SQL
      queries every time a Proc is called on a new object.
      == Proc Behaviour Changed
      Previously a Proc in Participable was expected to return an Array of
      User instances. This has been changed and instead it's now expected that
      a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return
      value of the Proc is ignored.
      == Permissions Checking
      The method Participable#participants uses
      Ability.users_that_can_read_project to check if the returned users have
      access to the project of "self" _without_ running multiple SQL queries
      for every user.
  19. 24 May, 2016 1 commit
  20. 09 May, 2016 1 commit
  21. 19 Apr, 2016 1 commit
  22. 15 Apr, 2016 1 commit
  23. 14 Apr, 2016 1 commit
  24. 13 Apr, 2016 1 commit
  25. 12 Apr, 2016 3 commits
    • Timothy Andrew's avatar
      Test the `Issue#to_branch_name` method. · 66ca8018
      Timothy Andrew authored
    • Timothy Andrew's avatar
      Augment the tests for `Issue#related_branches` · 91034af3
      Timothy Andrew authored
      - Test the case where we have a referenced merge request that's being
      - excluded as a "related branch"
      - This took a while to figure out, especially the
        `create_cross_references!` line.
    • Timothy Andrew's avatar
      Refactor `Issue#related_branches` · 5d88de09
      Timothy Andrew authored
      - Previously, the controller held the logic to calculate
        related branches, which was:
        `<branches ending with `issue.iid`> - <branches with a merge request referenced in the current issue>`
      - This logic belongs in the `related_branches` method, not in the
        controller. This commit makes this change.
      - This means that `Issue#related_branches` now needs to take a `User`.
        When we find the branches that have a merge request referenced in the
        current issue, this is limited to merge requests that the current user
        has access to.
      - This is not directly related to #14566, but is a related refactoring.
  26. 23 Mar, 2016 1 commit
  27. 19 Mar, 2016 2 commits
    • Yorick Peterse's avatar
      Tweaked performance of Issue#related_branches · 41b8d226
      Yorick Peterse authored
      Requesting the branch names of a repository works even when it's empty,
      thus there's no need to explicitly check for an empty repository.
      Removing this check cuts down the amount of Git operations which in turn
      cuts down request timings a bit. The regular expression used to compare
      branches was also moved out of the loop so it's created only once.
    • Zeger-Jan van de Weg's avatar
      Soft delete issuables · 212e83ba
      Zeger-Jan van de Weg authored
  28. 18 Mar, 2016 1 commit
    • Zeger-Jan van de Weg's avatar
      \#to_branch_name now uses the iid as postfix · 70ca3370
      Zeger-Jan van de Weg authored
      Given the branch name 'mep-mep' with an iid being 1,
      the current way, master's way, would yield a branch name of
      1-mep-mep. The problem for larger projects however would be that
      a developer might forget what iid the issue was.
      When this developer would try to tab complete it would:
      - Or result in 20+ branches possibly
      - Or start with the wrong digit, try again with digit++
        - Would see 20 branches, repeat
      Thus the obvious way of solving this is letting the dev tab complete
      on the issue title, which is easier to remember.
  29. 17 Mar, 2016 1 commit
  30. 15 Mar, 2016 3 commits