| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
| |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
| |
|
|
|
|
| |
And use it in the API.
|
|
|
|
|
|
|
| |
The ProjectsFinder and GroupFinder both support the same set of params. And the
`/api/v4/projects` and `/api/v4/group/:id/projects` also support the same set of
params. But they do not match the Finder params. So use a helper method to
transform them.
|
|
|
|
|
| |
Instead of trying to do the heavy lifting in the API itself, use the existing
features of the ProjectFinder.
|
|
|
|
|
| |
The ProjectFinder supports the `non_public` parameter. This can be used to find
only projects the user is member of.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'master'
Resolve "Use consistent style for trailing commas"
Closes #27144
See merge request !11063
|
| |
| |
| |
| |
| |
| | |
Use the EnforcedStyleForMultiline: no_comma option.
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In API V4 all endpoints were changed so Merge Requests and Issues
should be referred by iid, instead of id. Except the /notes endpoint
was forgotten. So change the endpoints from:
- /projects/:id/issues/:issue_id/notes
- /projects/:id/merge_requests/:merge_request_id/notes
To:
- /projects/:id/issues/:issue_iid/notes
- /projects/:id/merge_requests/:merge_request_iid/notes
For Project Snippets nothing changes.
|
| |
|
|
|
|
| |
to make sure we mean the global permissions
|
|
|
|
|
|
| |
- As opposed to the `id` that was previously being used.
- This brings the API routes closer to the web interface's routes.
- This is specific to API v4.
|
|
|
|
|
|
| |
- As opposed to the issue `id` that was previously being used.
- This brings the API routes closer to the web interface's routes.
- This is specific to API v4.
|
| |
|
|
|
|
| |
merge requests
|
|
|
|
| |
The query parameter `membership` should be more self-explaining.
|
| |
|
|
|
|
| |
- Also remove a redundant test
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Spam check and reCAPTCHA improvements
Closes #28093
See merge request !9248
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It consolidates these endpoints:
- /projects
- /projects/owned
- /projects/visible
- /projects/starred
- /projects/all
Into the /projects endpoint using query parameters.
|
| |
|
|
|
|
| |
add complete changelog for !8949
|
|
|
|
|
|
| |
Ensure that only privileged users can access merge requests in the API
See merge request !2053
|
| |
|
| |
|
|\ |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Time tracking API
Closes #25861
See merge request !8483
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
New endpoints are:
POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_estimate"
POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_time_estimate"
POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/add_spent_time"
POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_spent_time"
GET :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_stats"
|
| |/ |
|
| |\ |
|
| | |\
| | | |
| | | |
| | | |
| | | | |
Fix a Grape deprecation, use `#request_method` instead of `#route_method`
See merge request !8297
|