| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Private commit emails were introduced in !22560, but some parts of
GitLab were not updated to take account of them. This commit adds
support in places that were missed.
|
|
|
|
|
|
|
|
| |
The private commit email is automatically generated in the format:
id-username@noreply.HOSTNAME
GitLab instance admins are able to change the HOSTNAME portion,
that defaults to Gitlab's hostname, to whatever they prefer.
|
|\
| |
| |
| |
| | |
Remove PersonalAccessTokensFinder#find_by method
See merge request gitlab-org/gitlab-ce!22617
|
| |
| |
| |
| |
| |
| | |
find_by_token is overriden by TokenAuthenticatable which can be easily
missed or confused with #find_by(:token) defined by ActiveRecord. First
step for safer usage is to remove #find_by.
|
| |
| |
| |
| |
| |
| | |
This moves the `where` in the `has_many :keys` association in Project to
the Key model. This allows EE to override this method, instead of
modifying the source code directly.
|
|/
|
|
|
|
| |
This moves the `1.hour` constant used as the LDAP sync time to a
separate method. This allows EE to override this method using a module,
instead of directly modifying the source code.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
[11.4] Fix Token lookup for Git over HTTP and registry authentication
See merge request gitlab/gitlabhq!2577
|
|/ |
|
|
|
|
| |
requests"
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This refactors the TodoService class according to our code reuse
guidelines. The resulting code is a wee bit more verbose, but it allows
us to decouple the column names from the input, resulting in fewer
changes being necessary when we change the schema.
One particular noteworthy line in TodoService is the following:
todos_ids = todos.update_state(state)
Technically this is a violation of the guidelines, because
`update_state` is a class method, which services are not supposed to use
(safe for a few allowed ones). I decided to keep this, since there is no
alternative. `update_state` doesn't produce a relation so it doesn't
belong in a Finder, and we can't move it to another Service either. As
such I opted to just use the method directly.
Cases like this may happen more frequently, at which point we should
update our documentation with some sort of recommendation. For now, I
want to refrain from doing so until we have a few more examples.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
'45754-open-issues-from-archived-project-listed-in-group-issue-board' into 'master'
Resolve "Open issues from archived project listed in group issue board"
Closes #45754
See merge request gitlab-org/gitlab-ce!21721
|
| |
| |
| |
| | |
Pass the 'non_archived' flag to finder methods
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Return a default commit email if migration has not completed
Closes #51530
See merge request gitlab-org/gitlab-ce!21790
|
| |/
| |
| |
| | |
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51530
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the module `FromUnion`, which provides the class method
`from_union`. This simplifies the process of selecting data from the
result of a UNION, and reduces the likelihood of making mistakes. As a
result, instead of this:
union = Gitlab::SQL::Union.new([foo, bar])
Foo.from("(#{union.to_sql}) #{Foo.table_name}")
We can now write this instead:
Foo.from_union([foo, bar])
This commit also includes some changes to make this new setup work
properly. For example, a bug in Rails 4
(https://github.com/rails/rails/issues/24193) would break the use of
`from("sub-query-here").includes(:relation)` in certain cases. There was
also a CI query which appeared to repeat a lot of conditions from an
outer query on an inner query, which isn't necessary.
Finally, we include a RuboCop cop to ensure developers use this new
module, instead of using Gitlab::SQL::Union directly.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
|
|
|
|
| |
commit using"
|
|
|
|
|
| |
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
|
| |
|
|
|
|
|
|
| |
This ports the changes for the CODEOWNERS feature to CE:
- It adds the CODEOWNERS file.
- It adds the mention of the `with-codeowners` branch in TestEnv
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This refactors the AutocompleteController according to the guidelines
and boundaries discussed in
https://gitlab.com/gitlab-org/gitlab-ce/issues/49653. Specifically,
ActiveRecord logic is moved to different finders, which are then used in
the controller. View logic in turn is moved to presenters, instead of
directly using ActiveRecord's "to_json" method.
The finder MoveToProjectFinder is also adjusted according to the
abstraction guidelines and boundaries, resulting in a much more simple
finder.
By using finders (and other abstractions) more actively, we can push a
lot of logic out of the controller. We also remove the need for various
"before_action" hooks, though this could be achieved without using
finders as well.
The various finders related to AutcompleteController have also been
moved into a namespace. This removes the need for calling everything
"AutocompleteSmurfFinder", instead you can use
"Autocomplete::SmurfFinder".
|
|
|
|
| |
This whitelists all existing places where we use "destroy_all".
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Enable frozen string in app/models/*.rb
See merge request gitlab-org/gitlab-ce!20851
|
| |
| |
| |
| | |
Partially addresses #47424.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Allow users to set a status
Closes #35463
See merge request gitlab-org/gitlab-ce!20614
|
| |/
| |
| |
| |
| | |
This can be done trough the API for the current user, or on the
profile page.
|
|/
|
|
|
| |
This is in preparation for modifying importers to assign e-mails for
only confirmed emails.
|
|
|
|
| |
It's probably duplicated during resolving a conflict?
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Remove the use of `is_shared` of `Ci::Runner`
See merge request gitlab-org/gitlab-ce!20172
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First N+1: we may have loaded a user's notification settings already, but not
have loaded their sources. Because we're iterating through, we'd potentially
load sources that are completely unrelated, just because they belong to this
user.
Second N+1: we do a separate query for each user who could be subscribed to or
unsubcribed from the target. It's actually more efficient in this case to get
all subscriptions at once, as we will need to check most of them.
We can fix both by the slightly unpleasant means of checking IDs manually,
rather than object equality.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
'22846-notifications-broken-during-email-address-change-before-email-confirmed' into 'master'
Resolve "notifications broken during email address change before email confirmed"
Closes #22846
See merge request gitlab-org/gitlab-ce!18474
|
| |
| |
| |
| | |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|/
|
|
| |
Closes #32258.
|
|
|
|
| |
error page"
|
|\
| |
| |
| |
| |
| |
| | |
Delete remote uploads
Closes #45425
See merge request gitlab-org/gitlab-ce!18698
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ObjectStore uploader requires presence of associated `uploads` record
when deleting the upload file (through the carrierwave's after_commit
hook) because we keep info whether file is LOCAL or REMOTE in `upload`
object.
For this reason we can not destroy uploads as "dependent: :destroy" hook
because these would be deleted too soon. Instead we rely on
carrierwave's hook to destroy `uploads` in after_commit hook.
But in before_destroy hook we still have to delete not-mounted uploads
(which don't use carrierwave's destroy hook). This has to be done in
before_Destroy instead of after_commit because `FileUpload` requires
existence of model's object on destroy action.
This is not ideal state of things, in a next step we should investigate
how to unify model dependencies so we can use same workflow for all
uploads.
Related to #45425
|