| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Explain the extra chmod
There is confusion about what passing `0600` to File.open does.
```
$ touch /tmp/foobar
$ ls -l /tmp/foobar
-rw-r--r-- 1 jacobvosmaer wheel 0 Sep 26 14:20 /tmp/foobar
$ ruby -e 'File.open("/tmp/foobar", "w", 0600)'
$ ls -l /tmp/foobar
-rw-r--r-- 1 jacobvosmaer wheel 0 Sep 26 14:20 /tmp/foobar
$
$
$ rm /tmp/foobar
$ ruby -e 'File.open("/tmp/foobar", "w", 0600)'
$ ls -l /tmp/foobar
-rw------- 1 jacobvosmaer wheel 0 Sep 26 14:21 /tmp/foobar
```
See merge request !6523
|
| | |
|
| |
| |
| |
| |
| |
| | |
Adds .git and .atom to the master namespace regex
Updates existing group tests and adds two new ones
Updates path cleaning to also forbid .atom
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Memoize Github::Shell's secret token
## What does this MR do?
`API::Helpers#secret_token` was reading the secret file on every invocation. This MR reads the file in the `gitlab_shell_secret_token.rb` initializer and saves it as a class variable at `Gitlab::Shell.secret_token`
## Are there points in the code the reviewer needs to double check?
- I'm not sure if the use of `cattr_accessor` is the best approach, or if should be moved into the `class << self` block?
- Should `API::Helpers#secret_token` be removed in favor of using `Gitlab::Shell.secret_token`?
## Why was this MR needed?
Performance optimization.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22510
See merge request !6599
|
| | |
| | |
| | |
| | | |
every request.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add visible projects API
## What does this MR do?
Add a new `/projects/visible` API endpoint. Originally created by @ben.boeckel in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5970.
## Are there points in the code the reviewer needs to double check?
Does the API make sense?
## Why was this MR needed?
The `/projects` endpoint only returned projects the user was explicitly a member of.
Closes #19361, #3119.
See merge request !6681
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
FIxes #19361, #3119.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Resolve "NameError: undefined local variable or method `request' for #<Grape::Middleware::Error:0x007fc990..."
## What does this MR do?
Switches from `request` to `env` in an API helper method as the helpers are included in contexts lacking `request`.
## Are there points in the code the reviewer needs to double check?
I couldn't build a reproducer for this.
Closes #22820
See merge request !6615
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | | |
Per https://gitlab.com/gitlab-org/gitlab-ce/issues/22820, this helper is mixed
in to classes that lack a `request` method. They do include `env`, so use it
instead.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit alters views for the following models to use the markdown cache if
present:
* AbuseReport
* Appearance
* ApplicationSetting
* BroadcastMessage
* Group
* Issue
* Label
* MergeRequest
* Milestone
* Project
At the same time, calls to `escape_once` have been moved into the `single_line`
Banzai pipeline, so they can't be missed out by accident and the work is done
at save, rather than render, time.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit adds a number of _html columns and, with the exception of Note,
starts updating them whenever the content of their partner fields changes.
Note has a collision with the note_html attr_accessor; that will be fixed later
A background worker for clearing these cache columns is also introduced - use
`rake cache:clear` to set it off. You can clear the database or Redis caches
separately by running `rake cache:clear:db` or `rake cache:clear:redis`,
respectively.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fix inconsistent highlighting of already selected activity nav-links
## What does this MR do?
* Remove edge case where user could deselect an activity nav-link (which seems to be returning all the events)
* Explicitly add an `All` tab to return all the events
## Are there points in the code the reviewer needs to double check?
Shouldn't be
## Why was this MR needed?
Resolves existing UI inconsistency
## Screenshots (if relevant)
Before:
![4OzkoQVJYc](/uploads/fd2a7fdbde2159e875482ec7b828fe60/4OzkoQVJYc.gif)
After:
![E0lj8UhEUU](/uploads/7eb5155861eb79d72957de04c9f172c9/E0lj8UhEUU.gif)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
* Closes #21631
* Closes #21452
See merge request !6091
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
| |/ / /
|/| | |
| | | |
| | | | |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fix broken handling of certain calls in GitHub importer client
## What does this MR do?
It changes/fixes the behavior of request handling in GH client. Now it returns the response directly if it's not a collection of resources. Otherwise, it checks for a passed block, if true, then it yield each page to said block, if not, it collects all response in a single array then returns it.
Closes #22998
See merge request !6703
|
| | | | |
| | | | |
| | | | |
| | | | | |
Closes #22998
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
API: Use Grape DSL to document access requests and members endpoints
Part of #21979, depends on gitlab-org/gitlab-ce!6267 and gitlab-org/gitlab-ce!6266.
See merge request !6269
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
See !6096.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
add docs and tests - add additional validation
allow move without content
updated response
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Issue Board API support
## What does this MR do?
Adds support for Issue Board in the API.
## Are there points in the code the reviewer needs to double check?
~~Double check whether the Issue Board list movement fix is needed.~~
*Moved to a separate issue.* [#22890](https://gitlab.com/gitlab-org/gitlab-ce/issues/22890)
## Why was this MR needed?
Currently the API offers partial support to a project's Issue Board indirectly through Labels.
This MR adds support for listing, creating, moving and removing board lists.
## Does this MR meet the acceptance criteria?
- [X] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [X] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [X] API support added
- Tests
- [X] Added for this feature/bug
- [X] All builds are passing
- [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [X] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
[#22195](https://gitlab.com/gitlab-org/gitlab-ce/issues/22195)
See merge request !6646
|
| | |_|/ / / /
| |/| | | | |
| | | | | | |
| | | | | | | |
- Includes documentation and tests
|
| | | | | | | |
|
|\ \ \ \ \ \ \ |
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Prevent claiming associated model IDs via import
On the import side, we should be careful not to use any IDs as part of the JSON file that could have been manipulated.
Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/20821
Things we already do (__before__ this fix):
1. Remove all primary keys
1. **Always** reassign some of the foreign keys, such as ALL project IDs and user IDs (so it would be difficult to impersonate or try to gain access to another project)
1. Ignore/reject attributes that do not exist in the model
1. If someone reassigns a foreign key `submodel_id`, and that object has another json as the submodel, the new submodel will reassign the `submodel_id` to the newly created submodel ID.
Things we should do:
1. Remove/nullify any other foreign keys that we don't reassign (checked this, and there aren't many, fortunately. In fact, I don't think much harm can be done at all - at the moment).
See merge request !1985
|
| | | | | | | | | |
|
| | | |_|_|_|_|/
| | |/| | | | | |
|
|\ \ \ \ \ \ \ \
| |_|_|_|_|_|/ /
|/| | | | | | |
| | | | | | | | |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
| | | | | | | | |
|
| |\ \ \ \ \ \ \
| | |_|/ / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
API: disable rails session auth for non-GET/HEAD requests
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/22435
See merge request !1999
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| |_|_|_|_|/ / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
fix group links 404
### What does this MR do?
This MR should fix the 404 page, when creating a new group links without selecting any group from the group dropdown list.
### What are the relevant issue numbers?
Closes #20766
See merge request !6155
|
| | |_|_|_|/ /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | |
| | | | | | | |
See !6474.
|
| | | | | | | |
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Refactor Gitlab::Identifier
## What does this MR do?
This refactors `Gitlab::Identifier` so that it:
1. Has tests
2. Caches output in an instance variable to reduce queries
3. Uses only a single query to find a user by an SSH key, instead of 2
## Why was this MR needed?
This code was untested and would execute more SQL queries than needed.
See merge request !6680
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This refactors Gitlab::Identifier so it uses fewer queries and is
actually tested. Queries are reduced by caching the output as well as
using 1 query (instead of 2) to find a user using an SSH key.
|
|\ \ \ \ \ \ \ \
| |_|_|/ / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Update runner version only when updating contacted_at
## What does this MR do?
Improves how we update runners table, especially the version.
This is another round of improvements to reduce number of `ci_runners` updates.
I did make `contacted_at` to be updated more often (on average every 15 minutes).
We will also update version information in one go to solve: https://gitlab.com/gitlab-org/gitlab-ce/issues/22206
Improves: https://gitlab.com/gitlab-org/gitlab-ce/issues/22590
Solves: https://gitlab.com/gitlab-org/gitlab-ce/issues/22206
See merge request !6537
|
| | | | | | | | |
|
| | |/ / / / /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Skip wiki creation when GitHub project has wiki enabled
## What does this MR do?
When importing a repository from if the repository has wiki, we should not create the default wiki. Otherwise the GitHub importer will fail because the wiki repository already exist. This bug was introduced here https://gitlab.com/gitlab-org/gitlab-ce/commit/892dea67717c0efbd6a28f7639f34535ec0a8747
## Are there points in the code the reviewer needs to double check?
No.
## Why was this MR needed?
GitLab fails to import GitHub Wiki.
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [X] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
- [X] Added for this feature/bug
- [ ] All builds are passing
- [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Fixes #22225
See merge request !6665
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
If the GitHub project repository has wiki, we should not create
the default wiki. Otherwise the GitHub importer will fail because
the wiki repository already exist.
This bug was introduced here
https://gitlab.com/gitlab-org/gitlab-ce/commit/892dea67717c0efbd6a28f763
9f34535ec0a8747
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
Closes #22911
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Improve `Members::DestroyService`
Part of #21979.
See merge request !6267
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|