summaryrefslogtreecommitdiff
path: root/lib/gitlab
Commit message (Collapse)AuthorAgeFilesLines
* Instrument Grape Endpoint with Metrics::RackMiddleware18449-instrument-grape-endpointsPaco Guzman2016-06-141-1/+24
| | | | | | | | | | | | | | | | | | Generating the following tags Grape#GET /projects/:id/archive from Grape::Route objects like { :path => /:version/projects/:id/archive(.:format) :version => “v3”, :method => “GET” } Use an instance variable to cache raw_path transformations. This variable is only going to growth to the number of endpoints of the API, not with exact different requests We can store this cache as an instance variable because middleware are initialised only once
* Merge branch 'gitlab-auth-method-names' into 'master' Douwe Maan2016-06-132-4/+4
|\ | | | | | | | | | | | | | | | | | | Improve Gitlab::Auth method names Auth.find was a very generic name for a very specific method. Auth.find_in_gitlab_or_ldap was inaccurate in GitLab EE where it also looks in Kerberos. See merge request !4589
| * Improve Gitlab::Auth method namesJacob Vosmaer2016-06-102-4/+4
| | | | | | | | | | | | Auth.find was a very generic name for a very specific method. Auth.find_in_gitlab_or_ldap was inaccurate in GitLab EE where it also looks in Kerberos.
* | Removed old comment from update_column_in_batchesfix-migration-helper-race-conditionsYorick Peterse2016-06-131-2/+0
| |
* | Update columns in batches until no rows are leftYorick Peterse2016-06-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Instead of updating a fixed number of rows (based on the amount of rows available at the start of the update) the method "update_column_in_batches" will now continue updating rows until it runs out of rows to process. For a table with a high rate of inserts this may result in the migration taking quite some time. However, the alternative is not all rows being updated or the "change_column_null" method raising an error due to there being NULL values.
* | Handle NULL migration errors in migration helpersYorick Peterse2016-06-131-2/+2
| | | | | | | | | | This ensures that whenever changing the NULL constraint of a column fails we still drop the column.
* | Refactored SVG sanitizerGabriel Mazetto2016-06-121-24/+23
| |
* | Refactor SVG sanitizer and prevent `xlink:href` to refer to external resourcesGabriel Mazetto2016-06-121-5/+15
| |
* | Fix SVG whitelisting to allow namespaced attributesGabriel Mazetto2016-06-121-5/+18
| |
* | Merge branch 'workhorse-helpers' into 'master' Robert Speicher2016-06-101-8/+10
|\ \ | |/ |/| | | | | | | | | Add workhorse controller and API helpers Adds `send_git_blob` and `send_git_archive` controller and API helpers to reduce duplication and make Workhorse easier for a developer to work with. See merge request !4486
| * Merge branch 'master' into workhorse-helpersDouwe Maan2016-06-109-74/+153
| |\
| * \ Add send_git_diff helperDouwe Maan2016-06-0814-46/+222
| |\ \
| * | | Add workhorse controller and API helpersDouwe Maan2016-06-061-4/+4
| | | |
* | | | Merge branch 'gh-rate-limit' into 'master' Douwe Maan2016-06-102-57/+40
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrap all rate limiting logic inside GitHub API client ## What does this MR do? Move the actual rate limiting logic to GitHub API to clean the code inside the GitHub importer, and avoid code duplication. ## Are there points in the code the reviewer needs to double check? No there aren't. ## Why was this MR needed? Avoid code duplication to handle API rate limit in every call to the GitHub API. ## What are the relevant issue numbers? There are none. ## Screenshots (if relevant) Not relevant. See merge request !4552
| * | | Wrap all rate limiting logic inside GitHub API clientgh-rate-limitDouglas Barbosa Alexandre2016-06-092-57/+40
| | | |
* | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into award-emoji-fixesFatih Acet2016-06-092-7/+14
|\ \ \ \ | |/ / /
| * | | Merge branch 'saml-ldap-link-flow' into 'master' Douwe Maan2016-06-092-7/+14
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the SAML control flow to allow LDAP identities to be added to an existing SAML user. ## What does this MR do? It correctly lets an existing SAML user to add their LDAP identity automatically at login. ## Why was this MR needed? A customer had issues with the `auto_link_ldap_user` feature. The flow was not working if there was an account with a SAML identity, but no LDAP identity. GitLab would pick up the correct LDAP person, but due to the order of the flow, that LDAP person was never associated with the user. ## What are the relevant issue numbers? Fixes #17346 /cc @dblessing @balameb @stanhu See merge request !4498
| | * | | Syntax fixes and better logging around the `ldap_person` method.saml-ldap-link-flowPatricio Cano2016-06-081-4/+5
| | | | |
| | * | | Moved `find_or_create_ldap_user` method to parent class and added logging.Patricio Cano2016-06-072-30/+12
| | | | |
| | * | | Adjust the SAML control flow to allow LDAP identities to be added to an ↵Patricio Cano2016-06-062-3/+27
| | | | | | | | | | | | | | | | | | | | existing SAML user.
* | | | | Move award_menu_url variable into gon object.Fatih Acet2016-06-091-0/+1
|/ / / /
* | | | Allow custom text on 'almost there' pageSean McGivern2016-06-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new application setting, after_sign_up_text. This is text to be rendered as Markdown and shown on the 'almost there' page after a user signs up, but before they've confirmed their account. Tweak the styles for that page so that centered lists look reasonable.
* | | | Merge branch 'git-http-controller' into 'master' Rémy Coutable2016-06-084-66/+133
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dismantling Grack::Auth part 1: Git HTTP clients Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/14501 This does not completely get rid of Grack::Auth yet because Git LFS support is 'behind' it and I would like to not make this MR bigger than needed. - changed tests to make HTTP requests instead of calling Rack apps - added missing test cases for Git HTTP authentication - moved Git HTTP requests into a 'normal' Rails controller See merge request !3361
| * \ \ \ Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into ↵Jacob Vosmaer2016-06-0818-49/+308
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | git-http-controller Conflicts: lib/gitlab/workhorse.rb
| * | | | Fix testsJacob Vosmaer2016-06-062-21/+21
| | | | |
| * | | | Use public_sendJacob Vosmaer2016-06-031-2/+1
| | | | |
| * | | | Argh mixed up all the negativesJacob Vosmaer2016-06-031-2/+2
| | | | |
| * | | | Remove instances of Auth.newJacob Vosmaer2016-06-031-1/+1
| | | | |
| * | | | Refactor Gitlab::Auth rate limitingJacob Vosmaer2016-06-032-25/+53
| | | | |
| * | | | Changes after more review from RémyJacob Vosmaer2016-06-031-13/+13
| | | | |
| * | | | Rename finder to find_in_gitlab_or_ldapJacob Vosmaer2016-06-022-3/+3
| | | | |
| * | | | Merge branch 'master' into git-http-controllerJacob Vosmaer2016-06-0252-275/+925
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config/routes.rb
| * | | | | Remove parallel assignmentJacob Vosmaer2016-05-031-1/+2
| | | | | |
| * | | | | Rubocop and whitespaceJacob Vosmaer2016-05-021-2/+2
| | | | | |
| * | | | | Use correct auth finderJacob Vosmaer2016-05-021-1/+1
| | | | | |
| * | | | | Make CI/Oauth/rate limiting reusableJacob Vosmaer2016-04-292-13/+96
| | | | | |
| * | | | | Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into ↵Jacob Vosmaer2016-04-159-41/+90
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | git-http-controller
| * \ \ \ \ \ Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into ↵Jacob Vosmaer2016-04-1222-61/+409
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | git-http-controller
| * | | | | | | Move workhorse protocol code into libJacob Vosmaer2016-04-061-0/+7
| | | | | | | |
| * | | | | | | Delete dead codeJacob Vosmaer2016-04-061-52/+1
| | | | | | | |
* | | | | | | | Merge branch 'gh-disable-webhooks' into 'master' Douwe Maan2016-06-081-0/+1
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if GitHub rate limite API was reached before update Webhooks ## What does this MR do? Checks if the job needs to sleep, and wait for the rate limit to be reseted before update each Webhook. ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? The import process can fail if the API rate limit was reached during the import process. ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/17498 ## Screenshots (if relevant) Not relevant. See merge request !4509
| * | | | | | | Check if GitHub rate limite API was reached before update Webhooksgh-disable-webhooksDouglas Barbosa Alexandre2016-06-071-0/+1
| | | | | | | |
* | | | | | | | Merge branch 'refactor/ci-config-add-facade' into 'master' Rémy Coutable2016-06-072-0/+41
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new GitLab CI configuration facade class ## What does this MR do? This MR is a first iteration of major CI configuration refactoring. See #17139 and #15060 for more details. ## What are the relevant issue numbers? Closes #17139 See merge request !4462
| * | | | | | | | Improve Ci config loader by changing method signaturerefactor/ci-config-add-facadeGrzegorz Bizon2016-06-072-2/+2
| | | | | | | | |
| * | | | | | | | Remove duplicated exception in Ci configGrzegorz Bizon2016-06-071-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a temporary refactoring stub, that is planned to be removed after removing legacy config processor.
| * | | | | | | | Rename class that loads CI configuration to LoaderGrzegorz Bizon2016-06-062-7/+7
| | | | | | | | |
| * | | | | | | | Extract CI config YAML parser to a separate classGrzegorz Bizon2016-06-032-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this approach it would be easier to add different sources of configuration, that we do not necessairly have to be in YAML format.
| * | | | | | | | Add gitlab ci configuration class that holds hashGrzegorz Bizon2016-06-031-0/+21
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As for now, we keep this class inside a oryginal config processor class. We will move implementation to this class and delegate to it from current config processor. After original gitlab ci yaml processor not longer has relevant impelemntation we will replace it with new configuration class.
* | | | | | | | Merge branch 'issue_14189' into 'master' Jacob Schatz2016-06-071-0/+14
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ability to prioritize labels Closes #14189 See merge request !4009
| * | | | | | | Improve Issuable.order_labels_priorityRémy Coutable2016-06-061-0/+14
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>