Commit Graph

690 Commits

Author SHA1 Message Date
Imre Farkas 9bc5ed14fe Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-09 15:38:58 +00:00
Gosia Ksionek 64858317ad Add part of needed code
Add columns to store project creation settings

Add project creation level column in groups
 and default project creation column in application settings

Remove obsolete line from schema

Update migration with project_creation_level column existence check

Rename migrations to avoid conflicts

Update migration methods

Update migration method
2019-04-05 18:49:46 +00:00
Andreas Brandl 46b1b9c1d6 Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"
This reverts merge request !26823
2019-04-05 13:02:56 +00:00
Imre Farkas d9d7237d2e Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-05 11:45:47 +00:00
Martin Wortschack 8ce09a1d42 Externalize strings in admin controllers
- Update PO file
2019-03-21 14:31:34 +01:00
Alejandro Rodríguez 585fcfb9e7 Fix undefined variable error on json project views
This mistake seems to have always been there, but it only resulted in
errors on the `/explore*.json` since they were the one that _actually_
relied on the local variables.
2019-03-18 21:27:28 -03:00
Douglas Barbosa Alexandre 790a51a427 Merge branch '56863-system-messages-in-email' into 'master'
Show header and footer system messages in email

Closes #56863

See merge request gitlab-org/gitlab-ce!25474
2019-02-28 16:16:30 +00:00
Alexandru Croitor 77985826d9 Show header and footer system messages in email
* Add email_header_and_footer_enabled flag to appearances table
* Set email_header_and_footer_enabled default value to false
* Add checkbox to appearance to toggle show header and footer in emails
* Add email_header_and_footer_enabled to allowed params in controller
* Add header and footer messages to the html and text email layouts
* Remove the color styling for emails header and footer
* Add empty_mailer layout for emails without layout,
to have the header and footer applied
2019-02-27 22:07:50 +02:00
Alexis Reigel 022ee0c0c9
don't filter tags by taggable type
Due to performance reasons we cannot use the type filter on the tags.
The table for ActsAsTaggableOn is too big and too unoptimized, such that
the queries time out on production.

See the discussion
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19740#note_120087938
for more info.
2019-02-27 20:19:50 +01:00
Alexis Reigel 2e05292562
use lazy ajax filter dropdown for runner tags
the potential number of available runner tags is too large to load it
statically to a dropdown. we use the same lazy loaded dropdown as is
used for the users dropdown already.
2019-02-27 20:19:49 +01:00
Alexis Reigel 0fad7aa79c
add tag filter to admin runners page 2019-02-27 20:19:49 +01:00
Douwe Maan e5c7027faf Merge branch 'sh-fix-users-controller-ruby-2.6-compat' into 'master'
Make Admin::UsersController work with Ruby 2.6

See merge request gitlab-org/gitlab-ce!25316
2019-02-25 11:20:41 +00:00
Douwe Maan 28e1739a3f Port EE System Header And Footer feature to CE
remove EE specific code
remove EE licence checks
move migration from EE to CE folder structure
move specs from EE to CE folder structure
remove EE specific flag specs
2019-02-21 17:55:51 +02:00
Stan Hu e87c255d9e Make Admin::UsersController work with Ruby 2.6
Ruby 2.6 introduced `Enumerable#filter`, which takes no arguments.
Attempting to call `filter` on an `ActiveRecord::Relation` with a scope
will fail with a `wrong number of arguments (given 1, expected 0)`
message because the `Enumerable#filter` implementation overrides the
delegated `ActiveRecord::Relation#filter` method.

To make Admin::UsersController compatible with Ruby 2.6, rename
`User.filter` to `User.filter_items`.
2019-02-19 15:36:05 -08:00
Robert Speicher 12c70e636c
Admin section finds users case-insensitively
Previously, if you entered a username in the URL manually to view a
specific user, the lookup was done case-sensitively, despite usernames
being case-insensitive, often resulting in a 404. We now use the same
`find_routable!` logic as the non-admin Users controller.
2019-02-12 14:28:06 -08:00
Stan Hu 4ac4ba2654 Fix requests profiler in admin page not rendering HTML properly
By default in Rails 5, content passed to `render` will be
escaped. This doesn't work for the HTML profile output, which
should be considered safe HTML already.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56152
2019-01-09 23:09:43 -08:00
Jasper Maes fbdb463580 Fix deprecation: redirect_to :back is deprecated 2019-01-02 19:48:07 +01:00
Rémy Coutable 8d3dc32438
Make Admin::HealthCheckController EE-compatible
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-12-17 17:44:00 +01:00
Robert Speicher 006659e745 Merge branch 'render-text-deprecated' into 'master'
Fix deprecation: render :text is deprecated because it does not actually render…

See merge request gitlab-org/gitlab-ce!23425
2018-12-03 16:44:59 +00:00
Imre Farkas bd3a484032
Add config to disable impersonation
Adds gitlab.impersonation_enabled config option defaulting to true to
keep the current default behaviour.

Only the act of impersonation is modified, impersonation token
management is not affected.
2018-11-29 09:37:16 +01:00
Jasper Maes 1bb4ad9262 Fix deprecation: render :text is deprecated because it does not actually render a text/plain response 2018-11-29 08:05:13 +01:00
Stan Hu 1d16530501 Merge branch 'if-53347_fix_impersonation_tokens' into 'master'
Display impersonation token value only after creation

See merge request gitlab-org/gitlab-ce!22916
2018-11-15 19:06:28 +00:00
Stan Hu 23bcbf04c8 Remove display of local Sidekiq process in /admin/sidekiq
In a cloud-native or high-availability configuration, Sidekiq may not
be running on the same node as the Web worker. The output of the `ps`
output does not work in this case and can mislead admins that
Sidekiq isn't running. Remove it in favor of the Sidekiq dashboard,
which shows local processes using the Redis information.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/46133
2018-11-15 06:37:12 -08:00
Imre Farkas f3cd24a9f3
Display impersonation token value only after creation
Since we migrated all PersonlAccessTokens to store only its hash in the
DB, the token value can no longer be shown to the user.
2018-11-12 12:16:25 +01:00
Achilleas Pipinellis 7f47e13218 Merge branch 'gt-update-typos-in-comments-and-specs' into 'master'
Fix typos in comments and specs

See merge request gitlab-org/gitlab-ce!22683
2018-11-01 10:34:23 +00:00
George Tsiolis 733ae94921 Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
Mark Chao 39ae9a59a5 Make Highlight accept language param
This replaces the repository param.
This allows more flexiblity as sometimes we have highlight content
not related to repository. Sometimes we know ahead of time the language
of the content. Lastly language determination seems better fit as a
logic in the Blob class.
`repository` param is only used to determine the language, which seems
to be the responsiblity of Blob.
2018-10-30 15:44:55 +08:00
Rémy Coutable 631f4e2f54 Merge branch '52559-applications-api-get-delete' into 'master'
Add Applications API endpoints for listing and deleting entries.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52559

See merge request https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22296
2018-10-22 08:52:42 +00:00
Bob Van Landuyt f3fba178b9 Remove the `ForkedProjectLink` model
This removes the `ForkedProjectLink` model that has been replaced by
the `ForkNetworkMember` and `ForkNetwork` combination. All existing
relations have been adjusted to use these new models.

The `forked_project_link` table has been dropped.

The "Forks" count on the admin dashboard has been updated to count all
`ForkNetworkMember` rows and deduct the number of `ForkNetwork`
rows. This is because now the "root-project" of a fork network also
has a `ForkNetworkMember` row. This count could become inaccurate when
the root of a fork network is deleted.
2018-10-19 11:57:20 +02:00
JB Vasseur 9f34083901 Remove useless braces !22296 2018-10-18 17:46:03 +09:00
JB Vasseur 6da9733652 Use ApplicationsFinder !22296 2018-10-18 09:43:35 +09:00
Zeger-Jan van de Weg 30b4ce940d
Remove Git circuit breaker
Was introduced in the time that GitLab still used NFS, which is not
required anymore in most cases. By removing this, the API it calls will
return empty responses. This interface has to be removed in the next
major release, expected to be 12.0.
2018-10-10 09:08:18 +02:00
Tomasz Maczukin 42af229510
Simplify runner registration token resetting
This icommit adds several changes related to the same topic
- resetting a Runner registration token:

1. On Project settings page it adds a button for resetting the
   registration token and it removes the Runner token field
   that was confusing all GitLab users.

2. On Group settings page it adds the same button for resetting
   the registration token.

3. On Admin Runners settings page it moves the button to the same
   place as in Project and Group settings and it changes slightly
   the page layout to make it more similar to Group and Project
   setting pages.

4. It refactorizes a little the partial that prints runner
   registration description. Thanks to this Project, Group
   and Admin settings of the Runner are re-using the same
   code to generate the button.

5. Updates the translations of changed text.
2018-10-04 08:37:01 +02:00
Valery Sizov 2daa8d387b Remove background job throttling feature
We remove this feature as it never worked properly
2018-09-24 18:41:14 +03:00
Stan Hu 711e9f0796 Merge branch 'frozen-string-app-controller' into 'master'
Enable frozen string in app/controllers/**/*.rb

See merge request gitlab-org/gitlab-ce!21736
2018-09-20 22:53:27 +00:00
Dmitriy Zaporozhets 00057a75f4 Merge branch '44998-split-admin-settings-into-multiple-sub-pages' into 'master'
Resolve "Split admin settings into multiple sub pages"

Closes #44998

See merge request gitlab-org/gitlab-ce!21467
2018-09-20 13:24:20 +00:00
Martin Wortschack df9cb93091 Add empty controller actions and utilize referer_path helper 2018-09-19 12:57:14 +02:00
gfyoung 73322a0e55 Enable frozen string in app/controllers/**/*.rb
Enables frozen string for the following:

* app/controllers/*.rb
* app/controllers/admin/**/*.rb
* app/controllers/boards/**/*.rb
* app/controllers/ci/**/*.rb
* app/controllers/concerns/**/*.rb

Partially addresses #47424.
2018-09-18 21:22:45 -07:00
Martin Wortschack a7071deddc Parse request.referer properly 2018-09-18 10:47:05 +02:00
Yorick Peterse f0e7b5e7a3
Cleaned up CI runner administration code
In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19625 some
changes were introduced that do not meet our abstraction reuse rules.
This commit cleans up some of these changes so the requirements are met.

Most notably, sorting of the runners in Admin::RunnersFinder has been
delegated to Ci::Runner.order_by, similar to how we order data in
models that include the Sortable module. If we need more sort orders in
the future we can include Sortable and have Ci::Runner.order_by call
`super` to delegate to Sortable.order_by.
2018-09-14 15:05:46 +02:00
Martin Wortschack 378242d760 Adds empty methods for 'geo' and 'templates' 2018-09-14 14:37:05 +02:00
Grzegorz Bizon 55c23a0935 Merge branch 'feature/runner-state-filter-for-admin-view' into 'master'
Feature: State filter for admin runners view

See merge request gitlab-org/gitlab-ce!19625
2018-09-14 09:03:44 +00:00
Alexis Reigel 03890558b4
rename variable from *_cnt to *_count 2018-09-12 17:31:25 +02:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Martin Wortschack a2f7936c74 merge master and resolve conflicts 2018-09-11 08:43:10 +02:00
Martin Wortschack bfd2181310 use referer for redirect instead of hidden field param from partials 2018-09-10 19:45:33 +02:00
Jan Provaznik a415a904b8 Ask user explicitly about usage stats agreement 2018-09-07 14:32:28 +00:00
Felipe Artur 9710cda30e Move project services log to a separate file 2018-09-06 14:48:31 -03:00
Martin Wortschack 276e78e058 handle redirect properly 2018-09-06 15:44:15 +02:00
Martin Wortschack be41338b66 redirect to the relevant sub page after updating application settings 2018-09-05 11:22:18 +02:00