Commit Graph

401 Commits

Author SHA1 Message Date
Bob Van Landuyt c826ecc3e7 Port changes for CODEOWNERS to CE
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
2018-09-06 09:07:19 +02:00
Dmitriy Zaporozhets 3091a76724
Fix SQL error when sorting 2FA-enabled users by name in admin area
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-08-21 11:29:31 +02:00
Yorick Peterse 6f3c490107
Refactor AutocompleteController
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".
2018-08-20 13:53:00 +02:00
Rémy Coutable 83a0db0c55 Merge branch 'bvl-user-status-message-35463' into 'master'
Allow users to set a status

Closes #35463

See merge request gitlab-org/gitlab-ce!20614
2018-08-01 15:21:24 +00:00
Bob Van Landuyt b4c4b48a8c Allow users to set a status
This can be done trough the API for the current user, or on the
profile page.
2018-07-30 15:01:26 +02:00
Stan Hu 45ff4e3109 Add support for searching users by confirmed e-mails
This is in preparation for modifying importers to assign e-mails for
only confirmed emails.
2018-07-28 22:22:05 -07:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Sean McGivern 2a4039cf66 Merge branch 'update-rubocop' 2018-07-09 17:23:30 +01:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
Jasper Maes fbb48bd7e9 Rails5 fix mysql milliseconds problem in specs 2018-07-07 19:33:16 +02:00
Alexis Reigel bf27c6841c
send ico files with inline disposition 2018-06-05 16:20:20 +02:00
Kamil Trzciński afb2d667ca Merge branch '46010-add-more-validations-for-runners-and-runner-type' into 'master'
Improve validations for Ci::Runner#runner_type

See merge request gitlab-org/gitlab-ce!18901
2018-06-01 12:43:43 +00:00
Imre Farkas 20dfe25c15 Export assigned issues in iCalendar feed 2018-05-31 14:01:04 +00:00
Dylan Griffith bbd4cd118f Fix spec for User#ci_owned_runners 2018-05-31 10:56:28 +02:00
Kamil Trzciński 051f385e7e Refactor validations and make runner factory by default to be instance-wide runner 2018-05-31 10:56:07 +02:00
Rémy Coutable 3f73b6bee0
Don't set the notification_email when only unconfirmed_email is changed
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-05-22 12:47:20 +02:00
🙈 jacopo beschi 🙉 01275667e3 Resolve "Opening Project with invite but without accepting leads to 404 error page" 2018-05-17 09:19:47 +00:00
Kamil Trzciński 60b14e5296 Merge branch 'jprovazn-remote-upload-destroy' into 'master'
Delete remote uploads

Closes #45425

See merge request gitlab-org/gitlab-ce!18698
2018-05-16 20:29:21 +00:00
Dylan Griffith c3f9d80a6e Rename User#ci_authorized_runners -> ci_owned_runners 2018-05-16 10:52:28 +02:00
Dylan Griffith 846f73b53b Allow group runners to be viewed/edited in API 2018-05-16 10:52:28 +02:00
Jan Provaznik 7da3b2cdd0 Delete remote uploads
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
2018-05-16 08:58:07 +02:00
Douglas Barbosa Alexandre 8e51c481b6
Does not log failed sign-in attempts when database is in read-only mode 2018-05-14 20:23:40 -03:00
Bob Van Landuyt f7f13f9db0 Block access to API & git when terms are enforced
When terms are enforced, but the user has not accepted the terms
access to the API & git is rejected with a message directing the user
to the web app to accept the terms.
2018-05-10 17:02:27 +02:00
Lin Jen-Shin ab286656b2 Resolve "Namespace factory is problematic" 2018-04-23 15:48:26 +00:00
Dylan Griffith 0e78c2e9c9 Allow group owner to enable runners from subgroups (#41981) 2018-04-09 10:46:42 +10:00
Andreas Brandl 29b0a90c20 Cache personal projects count.
Closes #37462.
2018-04-06 12:27:20 +02:00
Douwe Maan 7de250fb81
Ensure internal users (ghost, support bot) get assigned a namespace 2018-04-05 11:14:32 +02:00
blackst0ne 3d3b46f344 [Rails5] Rename `sort` methods to `sort_by_attribute` 2018-04-04 09:19:47 +00:00
Sean McGivern 869b7b31cf Merge branch 'dm-deploy-keys-default-user' into 'master'
Ensure hooks run when a deploy key without a user pushes

Closes #44317

See merge request gitlab-org/gitlab-ce!18057
2018-03-29 09:30:10 +00:00
Douwe Maan 9311519721 Don’t delete deploy key when user who created it is deleted 2018-03-28 18:54:31 +02:00
Bob Van Landuyt ce69419a60 Remove permanent redirects
Removes permanent redirects, this means that redirects will only be
possible as long as the old route isn't taken by a new project/group.
2018-03-28 14:12:08 +02:00
Fabian Schneider 839589fde3 Change avatar error message to include allowed file formats 2018-03-22 19:01:43 +01:00
Andreas Brandl 7d2859e98b Leverage user_contributed_projects to find recent events.
Closes #40525.
2018-03-07 14:36:25 +01:00
Andreas Brandl 39011be53d Extract method User#authorizations_for_projects. 2018-03-02 18:23:03 +01:00
Stan Hu 46e6a9f8a0 Don't attempt to update user tracked fields if database is in read-only
With Geo, attempting to view an endpoint with a user could result in an
Error 500 since Devise attempts to update the last sign-in IP and other
details.

Closes gitlab-org/gitlab-ee#4972
2018-02-17 21:30:29 -08:00
Peter Lauck eddf4c0f6c Strip whitespace from username/login value for user lookup
As per the discussion with @psimyn, this change does not affect the frontend, so user input will not be validated on the signin screen.

Instead, the value sent to the backend has leading and trailing whitespace stripped before looking up the user with find_by.

Closes #42637
2018-02-13 02:21:51 -05:00
Douwe Maan bbb3e58bc7 Merge branch 'feature/oidc-groups-claim' into 'master'
Add groups to OpenID Connect claims

See merge request gitlab-org/gitlab-ce!16929
2018-02-08 14:26:18 +00:00
Hassan Zamani 583ef9458c
Add groups to OpenID Connect claims 2018-02-08 13:22:41 +01:00
Douwe Maan a03d29da1d Validate User username only on Namespace, and bubble up appropriately 2018-02-06 12:09:03 -06:00
Douwe Maan 75144b1e03 Validate path uniqueness only on Route, and bubble up appropriately 2018-02-06 12:06:38 -06:00
Douwe Maan 8d69436c90 Validate user namespace before saving so that errors persist on model 2018-02-06 12:06:05 -06:00
Rémy Coutable 9483cbab26 Merge branch '26468-fix-admin-recent-sign-in' into 'master'
Using correct column for sorting users by Recent Sign-in

Closes #26468

See merge request gitlab-org/gitlab-ce!13852
2018-02-06 09:18:42 +00:00
Mayra Cabrera 68a419c879 31885 - Ability to transfer a single group to another group 2018-02-06 00:10:58 +00:00
Poornima cca13d1e40 Using correct column for sorting users by Recent Sign-in
Removing last_sign_in_at in specs
2018-02-05 23:05:54 +05:30
Andreas Brandl d07addbf6e Add foreign keys to todos table.
Fixes #32282.
2018-02-05 16:16:57 +01:00
Mario de la Ossa eaada9d706 use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00:00
Nick Thomas 93ea3234df
Use the DatabaseCleaner 'deletion' strategy instead of 'truncation' 2018-01-24 17:25:55 +00:00
Mark Fletcher 580fa6becf Yield no results for blank searches on User name, username and email
Given no search term, the `search` and `search_with_secondary_emails` methods will yield an empty result set
2018-01-21 17:24:50 +00:00
Dmitriy Zaporozhets c85c0ccc8d
Merge branch 'mdelaossa/gitlab-ce-31995-project-limit-default-fix'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-01-04 19:35:14 +02:00
Francisco Javier López 2665aea627 Fix user membership destroy relation 2018-01-02 15:06:44 +00:00