summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
Commit message (Collapse)AuthorAgeFilesLines
* Port `read_cross_project` ability from EEBob Van Landuyt2018-02-221-1/+1
|
* Adds Rubocop rule for line break around conditionals🙈 jacopo beschi 🙉2018-01-111-0/+1
|
* Save user ID and username in Grape API log (api_json.log)sh-store-user-in-api-logsStan Hu2018-01-081-0/+7
| | | | | | This will enable admins to identify who actually made the API request. Relates to #36960
* Merge branch 'backport-issue_3413' into 'master'Sean McGivern2018-01-051-3/+12
|\ | | | | | | | | [EE-backport] Add group boards API endpoint See merge request gitlab-org/gitlab-ce!16194
| * EE-BACKPORT group boardsFelipe Artur2018-01-041-3/+12
| |
* | Fix API endpoints to edit wiki pages where project belongs to a grouprd-api-request-to-edit-wiki-page-fails-when-project-belongs-to-groupRubén Dávila2018-01-031-1/+1
|/ | | | | | | | In some cases is prefered to manually create a ProjectWiki over using Project#wiki. This is because Project#wiki always uses the #owner (which is a User sometimes) as the author of the wiki changes but sometimes the owner is a Group and it doesn't respond to #username
* Merge remote-tracking branch 'upstream/master' into no-ivar-in-modulesLin Jen-Shin2017-11-301-0/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (170 commits) support ordering of project notes in notes api Redirect to an already forked project if it exists Reschedule the migration to populate fork networks Create fork networks for forks for which the source was deleted. Fix item name and namespace text overflow in Projects dropdown Minor backport from EE fix link that was linking to `html` instead of `md` Backport epic tasklist Add timeouts for Gitaly calls SSHUploadPack over Gitaly is now OptOut fix icon colors in commit list Fix star icon color/stroke Backport border inline edit Add checkboxes to automatically run AutoDevops pipeline BE for automatic pipeline when enabling Auto DevOps I am certainly weary of debugging sidekiq but I don't think that's what was meant Ensure MRs always use branch refs for comparison Fix issue comment submit button disabled on GFM paste Lock seed-fu at the correct version in Gemfile.lock Improve indexes on merge_request_diffs ...
| * Introduce :read_namespace access policy for namespace and groupTomasz Maczukin2017-11-231-1/+1
| |
| * Allow request namespace by ID or pathTomasz Maczukin2017-11-231-0/+22
| |
* | Merge remote-tracking branch 'upstream/master' into no-ivar-in-modulesLin Jen-Shin2017-11-221-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (126 commits) Update VERSION to 10.3.0-pre Update CHANGELOG.md for 10.2.0 default fill color for SVGs ignore hashed repos (for now) when using `rake gitlab:cleanup:repos` Use Redis cache for branch existence checks Update CONTRIBUTING.md: Link definition of done to criteria Use `make install` for Gitaly setups in non-test environments FileUploader should check for hashed_storage?(:attachments) to use disk_path Set the default gitlab-shell timeout to 3 hours Update composite pipelines index to include "id" Use arrays in Pipeline#latest_builds_with_artifacts Fix blank states using old css Skip confirmation user api Custom issue tracker Revert "check for `read_only?` first before seeing if request is disallowed" add `#with_metadata` scope to remove a N+1 from the notes' API Fix promoting milestone updating all issuables without milestone Batchload blobs for diff generation check for `read_only?` first before seeing if request is disallowed use `Gitlab::Routing.url_helpers` instead of `Rails.application.routes.url_helpers` ...
| * Moved Exceptions to Gitlab::AuthFrancisco Lopez2017-11-171-1/+1
| |
| * Moving exceptions to UserAuthFindersFrancisco Lopez2017-11-171-1/+1
| |
* | Move ModuleWithInstanceVariables to Gitlab namespaceLin Jen-Shin2017-11-221-5/+5
| | | | | | | | | | And use .rubocop.yml to exclude paths we don't care, rather than using the cop itself to exclude.
* | Use StrongMemoize and enable/disable cops properlyLin Jen-Shin2017-11-181-2/+8
| |
* | Merge remote-tracking branch 'upstream/master' into no-ivar-in-modulesLin Jen-Shin2017-11-171-0/+10
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (507 commits) Add dropdowns documentation Convert migration to populate latest merge request ID into a background migration Set 0.69.0 instead of latest for codeclimate image De-duplicate background migration matchers defined in spec/support/migrations_helpers.rb Update database_debugging.md Update database_debugging.md Move installation of apps higher Change to Google Kubernetes Cluster and add internal links Add Ingress description from official docs Add info on creating your own k8s cluster from the cluster page Add info about the installed apps in the Cluster docs Resolve "lock/confidential issuable sidebar custom svg icons iteration" Update HA README.md to clarify GitLab support does not troubleshoot DRBD. Update license_finder to 3.1.1 Make sure NotesActions#noteable returns a Noteable in the update action Cache the number of user SSH keys Adjust openid_connect_spec to use `raise_error` Resolve "Clicking on GPG verification badge jumps to top of the page" Add changelog for container repository path update Update container repository path reference ...
| * Add administrative endpoint to list all pages domainsTravis Miller2017-11-131-0/+9
| |
| * Support custom attributes on projectsMarkus Koller2017-11-061-0/+1
| |
* | Merge remote-tracking branch 'upstream/master' into no-ivar-in-modulesLin Jen-Shin2017-11-061-59/+25
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (1723 commits) Resolve "Editor icons" Refactor issuable destroy action Ignore routes matching legacy_*_redirect in route specs Gitlab::Git::RevList and LfsChanges use lazy popen Gitlab::Git::Popen can lazily hand output to a block Merge branch 'master-i18n' into 'master' Remove unique validation from external_url in Environment Expose `duration` in Job API entity Add TimeCop freeze for DST and Regular time Harcode project visibility update a changelog Put a condition to old migration that adds fast_forward column to MRs Expose project visibility as CI variable fix flaky tests by removing unneeded clicks and focus actions fix flaky test in gfm_autocomplete_spec.rb Use Gitlab::Git operations for repository mirroring Encapsulate git operations for mirroring in Gitlab::Git Create a Wiki Repository's raw_repository properly Add `Gitlab::Git::Repository#fetch` command Fix Gitlab::Metrics::System#real_time and #monotonic_time doc ...
| * Update specs for sudo behaviorDouwe Maan2017-11-021-5/+2
| |
| * Add sudo API scopeDouwe Maan2017-11-021-8/+12
| |
| * Add pages domains API implementationTravis Miller2017-10-221-0/+4
| |
| * Move all API authentication code to APIGuardDouwe Maan2017-10-121-51/+1
| |
| * Send API parameters as extra data for sentry errorsapi-sentry-extraAlejandro Rodríguez2017-10-051-1/+1
| |
| * Ensure no exception is raised when Raven tries to get the current user in ↵38571-fix-exception-in-raven-reportRémy Coutable2017-09-291-3/+5
| | | | | | | | | | | | API context Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Make sure API responds with 401 when invalid authentication info is provideddm-api-unauthorizedDouwe Maan2017-09-281-10/+20
| |
* | Allow simple ivar ||= form. Update accordinglyLin Jen-Shin2017-09-191-1/+3
| |
* | Add cop to make sure we don't use ivar in a moduleLin Jen-Shin2017-09-181-0/+1
|/
* Make Members with Owner and Master roles always able to create subgroups30473-allow-creation-of-subgroups-with-gitlab_default_can_create_group-set-to-falseRuben Davila2017-09-071-1/+1
|
* Merge branch 'wiki_api' into 'master'Grzegorz Bizon2017-09-071-0/+6
|\ | | | | | | | | | | | | Add API support for wiki pages Closes #12747 See merge request !13372
| * Add API support for wiki pagesblackst0ne2017-09-071-0/+6
| |
* | Respond with a bad request if artifact path is invalidGrzegorz Bizon2017-09-061-1/+1
| |
* | Extract job artifacts API code to a separate fileGrzegorz Bizon2017-09-061-0/+12
| |
* | Use API helper to send artifact file through WorkhorseGrzegorz Bizon2017-09-051-0/+4
| |
* | Don't use public_send in destroy_conditionally! helperSean McGivern2017-08-301-2/+4
| | | | | | | | | | As we only override in two places, we could just ask for the value rather than the method name.
* | Update remaining endpointsRobert Schilling2017-08-281-1/+1
| |
* | Conditionally destroy a ressourceRobert Schilling2017-08-281-3/+14
| |
* | API: Respect the 'If-Unmodified-Since' for delete endpointsRobert Schilling2017-08-281-0/+8
|/
* Upgrade grape to 1.0Zeger-Jan van de Weg2017-08-161-1/+1
| | | | | Main feature was the deprication of the Hashie stuff, so the access by calling keys as method is gone now.
* Show error message for API 500 error in tests, andLin Jen-Shin2017-08-111-1/+9
| | | | document have_gitlab_http_status
* Do not validate CSRF token in API unless neededdm-api-current-userDouwe Maan2017-08-021-0/+2
|
* Rescue only from ActionController::InvalidAuthenticityTokenDouwe Maan2017-07-261-2/+2
|
* Add `rescue false`.blackst0ne2017-07-261-1/+1
|
* Refactor CSRF protectionblackst0ne2017-07-261-30/+2
|
* Add CSRF token verification to APIblackst0ne2017-07-261-4/+34
|
* Add group milestones API endpointissue_34622Felipe Artur2017-07-211-0/+4
|
* Add user projects APIvanadium232017-07-061-1/+2
|
* Implement review comments from @dbalexandre for !12300.Timothy Andrew2017-06-281-2/+2
|
* When verifying scopes, manually include scopes from `API::API`.Timothy Andrew2017-06-281-4/+19
| | | | | | | | - They are not included automatically since `API::Users` does not inherit from `API::API`, as I initially assumed. - Scopes declared in `API::API` are considered global (to the API), and need to be included in all cases.
* Allow API scope declarations to be applied conditionally.Timothy Andrew2017-06-281-1/+1
| | | | | | | | | | | - Scope declarations of the form: allow_access_with_scope :read_user, if: -> (request) { request.get? } will only apply for `GET` requests - Add a negative test to a `POST` endpoint in the `users` API to test this. Also test for this case in the `AccessTokenValidationService` unit tests.
* Initial attempt at refactoring API scope declarations.Timothy Andrew2017-06-281-2/+4
| | | | | | | | | | - Declaring an endpoint's scopes in a `before` block has proved to be unreliable. For example, if we're accessing the `API::Users` endpoint - code in a `before` block in `API::API` wouldn't be able to see the scopes set in `API::Users` since the `API::API` `before` block runs first. - This commit moves these declarations to the class level, since they don't need to change once set.