From af0bbf70bb9b7ffc088ecb93f66b6593edb16a66 Mon Sep 17 00:00:00 2001 From: Annabel Gray Date: Tue, 12 Jun 2018 18:26:47 +0000 Subject: Merge branch 'fix-labels-too-large-from-label-list-redesign' into 'master' Fix labels too large Closes #47499 and #47762 See merge request gitlab-org/gitlab-ce!19640 --- app/assets/stylesheets/pages/labels.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/pages/labels.scss b/app/assets/stylesheets/pages/labels.scss index 3c74c5ed2b4..144e9c16943 100644 --- a/app/assets/stylesheets/pages/labels.scss +++ b/app/assets/stylesheets/pages/labels.scss @@ -58,7 +58,7 @@ } .color-label { - padding: $gl-padding-4 $grid-size; + padding: 0 $grid-size; line-height: 16px; border-radius: $label-border-radius; color: $white-light; @@ -112,6 +112,10 @@ } } } + + .color-label { + padding: $gl-padding-4 $grid-size; + } } .prioritized-labels { -- cgit v1.2.1 From 390a44a1014842ef8718eb08463495d8d792740d Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Tue, 12 Jun 2018 18:48:24 +0000 Subject: Merge branch '47265-inputs-labels-alignment' into 'master' Resolve "Alignment of labels within two column layouts for radio and check boxes" Closes #47265 See merge request gitlab-org/gitlab-ce!19671 --- app/assets/stylesheets/bootstrap_migration.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/bootstrap_migration.scss b/app/assets/stylesheets/bootstrap_migration.scss index 88d6bae349a..810ed5bb0a6 100644 --- a/app/assets/stylesheets/bootstrap_migration.scss +++ b/app/assets/stylesheets/bootstrap_migration.scss @@ -94,6 +94,7 @@ hr { } .form-group.row .col-form-label { + padding-top: 0; // Bootstrap 4 aligns labels to the left // for horizontal forms @include media-breakpoint-up(md) { -- cgit v1.2.1 From 229efb6d8b96a77d3525750512bdb28e92c00c6a Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Tue, 12 Jun 2018 19:57:36 +0000 Subject: Merge branch '47773-search-bar' into 'master' Resolve "Project search in navbar is missing top margin in dev.gitlab.com" Closes #47773 See merge request gitlab-org/gitlab-ce!19718 --- app/assets/stylesheets/framework/header.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/stylesheets/framework/header.scss b/app/assets/stylesheets/framework/header.scss index 1d5bdaa8961..db59c91e375 100644 --- a/app/assets/stylesheets/framework/header.scss +++ b/app/assets/stylesheets/framework/header.scss @@ -268,6 +268,8 @@ .navbar-sub-nav, .navbar-nav { + align-items: center; + > li { > a:hover, > a:focus { -- cgit v1.2.1 From 80f6c2c73a48f5d14afd7740bc08853f373d06b5 Mon Sep 17 00:00:00 2001 From: Annabel Gray Date: Tue, 12 Jun 2018 22:25:57 +0000 Subject: Merge branch '47551-participants-tooltip-is-cutoff-when-too-close-to-the-window-edge' into 'master' Resolve "Participants tooltip is cutoff when too close to the window edge" Closes #47551 See merge request gitlab-org/gitlab-ce!19669 --- .../javascripts/vue_shared/components/user_avatar/user_avatar_image.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue index cc9cc46bb4c..a5c4fbcce31 100644 --- a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue +++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue @@ -86,6 +86,7 @@ export default { Members > No padding between dropdowns/input" Closes #46702 See merge request gitlab-org/gitlab-ce!19724 --- app/assets/stylesheets/pages/members.scss | 4 ---- app/views/groups/group_members/index.html.haml | 7 ++++--- app/views/projects/project_members/_team.html.haml | 7 ++++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/pages/members.scss b/app/assets/stylesheets/pages/members.scss index 9914555d309..5fdb2b4a90a 100644 --- a/app/assets/stylesheets/pages/members.scss +++ b/app/assets/stylesheets/pages/members.scss @@ -121,10 +121,6 @@ background: transparent; border: 0; outline: 0; - - @include media-breakpoint-up(sm) { - right: 160px; - } } .flex-project-members-panel { diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index 6a0321bcd2b..13d584f5f1d 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -25,9 +25,10 @@ %span.badge= @members.total_count = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form flex-project-members-form' do .form-group - = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false } - %button.member-search-btn{ type: "submit", "aria-label" => "Submit search" } - = icon("search") + .position-relative.append-right-8 + = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false } + %button.member-search-btn{ type: "submit", "aria-label" => "Submit search" } + = icon("search") - if can_manage_members = render 'shared/members/filter_2fa_dropdown' = render 'shared/members/sort_dropdown' diff --git a/app/views/projects/project_members/_team.html.haml b/app/views/projects/project_members/_team.html.haml index a30870a241c..0c5a187f208 100644 --- a/app/views/projects/project_members/_team.html.haml +++ b/app/views/projects/project_members/_team.html.haml @@ -9,9 +9,10 @@ %span.badge.badge-pill= members.total_count = form_tag project_project_members_path(project), method: :get, class: 'form-inline member-search-form flex-project-members-form' do .form-group - = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false } - %button.member-search-btn{ type: "submit", "aria-label" => "Submit search" } - = icon("search") + .position-relative + = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false } + %button.member-search-btn{ type: "submit", "aria-label" => "Submit search" } + = icon("search") = render 'shared/members/sort_dropdown' %ul.content-list.members-list = render partial: 'shared/members/member', collection: members, as: :member -- cgit v1.2.1 From 3774db741fdc26c6fdaa0d199db20ad5f090a410 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Fri, 8 Jun 2018 21:30:52 +0000 Subject: Merge branch 'bvl-terms-on-registration' into 'master' Users can accept terms during registration Closes gitlab-ee#6262 and #47621 See merge request gitlab-org/gitlab-ce!19583 --- app/controllers/registrations_controller.rb | 27 +++- app/controllers/users/terms_controller.rb | 3 +- .../admin/application_settings/_terms.html.haml | 6 +- .../admin/application_settings/show.html.haml | 4 +- app/views/devise/shared/_signup_box.html.haml | 7 + app/views/users/terms/index.html.haml | 27 ++-- .../unreleased/bvl-terms-on-registration.yml | 5 + doc/user/admin_area/settings/img/enforce_terms.png | Bin 51979 -> 54881 bytes doc/user/admin_area/settings/img/sign_up_terms.png | Bin 0 -> 18174 bytes doc/user/admin_area/settings/terms.md | 13 ++ locale/gitlab.pot | 95 +++++++++----- spec/controllers/registrations_controller_spec.rb | 21 +++ spec/features/admin/admin_settings_spec.rb | 2 +- spec/features/users/signup_spec.rb | 21 ++- spec/features/users/terms_spec.rb | 143 ++++++++++++--------- 15 files changed, 254 insertions(+), 120 deletions(-) create mode 100644 changelogs/unreleased/bvl-terms-on-registration.yml create mode 100644 doc/user/admin_area/settings/img/sign_up_terms.png diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index f5a222b3a48..e6d6965036e 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -3,6 +3,9 @@ class RegistrationsController < Devise::RegistrationsController include AcceptsPendingInvitations before_action :whitelist_query_limiting, only: [:destroy] + before_action :ensure_terms_accepted, + if: -> { Gitlab::CurrentSettings.current_application_settings.enforce_terms? }, + only: [:create] def new redirect_to(new_user_session_path) @@ -18,7 +21,9 @@ class RegistrationsController < Devise::RegistrationsController if !Gitlab::Recaptcha.load_configurations! || verify_recaptcha accept_pending_invitations - super + super do |new_user| + persist_accepted_terms_if_required(new_user) + end else flash[:alert] = 'There was an error with the reCAPTCHA. Please solve the reCAPTCHA again.' flash.delete :recaptcha_error @@ -40,6 +45,16 @@ class RegistrationsController < Devise::RegistrationsController protected + def persist_accepted_terms_if_required(new_user) + return unless new_user.persisted? + return unless Gitlab::CurrentSettings.current_application_settings.enforce_terms? + + if terms_accepted? + terms = ApplicationSetting::Term.latest + Users::RespondToTermsService.new(new_user, terms).execute(accepted: true) + end + end + def destroy_confirmation_valid? if current_user.confirm_deletion_with_password? current_user.valid_password?(params[:password]) @@ -91,4 +106,14 @@ class RegistrationsController < Devise::RegistrationsController def whitelist_query_limiting Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-ce/issues/42380') end + + def ensure_terms_accepted + return if terms_accepted? + + redirect_to new_user_session_path, alert: _('You must accept our Terms of Service and privacy policy in order to register an account') + end + + def terms_accepted? + Gitlab::Utils.to_boolean(params[:terms_opt_in]) + end end diff --git a/app/controllers/users/terms_controller.rb b/app/controllers/users/terms_controller.rb index f7c6d1d59db..1b1560a2a00 100644 --- a/app/controllers/users/terms_controller.rb +++ b/app/controllers/users/terms_controller.rb @@ -2,6 +2,7 @@ module Users class TermsController < ApplicationController include InternalRedirect + skip_before_action :authenticate_user! skip_before_action :enforce_terms! skip_before_action :check_password_expiration skip_before_action :check_two_factor_requirement @@ -14,7 +15,7 @@ module Users def index @redirect = redirect_path - if @term.accepted_by_user?(current_user) + if current_user && @term.accepted_by_user?(current_user) flash.now[:notice] = "You have already accepted the Terms of Service as #{current_user.to_reference}" end end diff --git a/app/views/admin/application_settings/_terms.html.haml b/app/views/admin/application_settings/_terms.html.haml index 257565ce193..7941c8508e8 100644 --- a/app/views/admin/application_settings/_terms.html.haml +++ b/app/views/admin/application_settings/_terms.html.haml @@ -1,4 +1,4 @@ -= form_for @application_setting, url: admin_application_settings_path do |f| += form_for @application_setting, url: admin_application_settings_path, html: { class: 'fieldset-form' } do |f| = form_errors(@application_setting) %fieldset @@ -7,13 +7,13 @@ .form-check = f.check_box :enforce_terms, class: 'form-check-input' = f.label :enforce_terms, class: 'form-check-label' do - = _("Require all users to accept Terms of Service when they access GitLab.") + = _("Require all users to accept Terms of Service and Privacy Policy when they access GitLab.") .form-text.text-muted = _("When enabled, users cannot use GitLab until the terms have been accepted.") .form-group.row .col-sm-12 = f.label :terms do - = _("Terms of Service Agreement") + = _("Terms of Service Agreement and Privacy Policy") .col-sm-12 = f.text_area :terms, class: 'form-control', rows: 8 .form-text.text-muted diff --git a/app/views/admin/application_settings/show.html.haml b/app/views/admin/application_settings/show.html.haml index 3f440c76ee0..eeac441d973 100644 --- a/app/views/admin/application_settings/show.html.haml +++ b/app/views/admin/application_settings/show.html.haml @@ -50,11 +50,11 @@ %section.settings.as-terms.no-animate#js-terms-settings{ class: ('expanded' if expanded) } .settings-header %h4 - = _('Terms of Service') + = _('Terms of Service and Privacy Policy') %button.btn.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p - = _('Include a Terms of Service agreement that all users must accept.') + = _('Include a Terms of Service agreement and Privacy Policy that all users must accept.') .settings-content = render 'terms' diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml index 2554b2688bb..ee7369f54a9 100644 --- a/app/views/devise/shared/_signup_box.html.haml +++ b/app/views/devise/shared/_signup_box.html.haml @@ -22,6 +22,13 @@ = f.label :password = f.password_field :password, class: "form-control bottom", required: true, pattern: ".{#{@minimum_password_length},}", title: "Minimum length is #{@minimum_password_length} characters." %p.gl-field-hint Minimum length is #{@minimum_password_length} characters + - if Gitlab::CurrentSettings.current_application_settings.enforce_terms? + .form-group + = check_box_tag :terms_opt_in, '1', false, required: true + = label_tag :terms_opt_in do + - terms_link = link_to s_("I accept the|Terms of Service and Privacy Policy"), terms_path, target: "_blank" + - accept_terms_label = _("I accept the %{terms_link}") % { terms_link: terms_link } + = accept_terms_label.html_safe %div - if Gitlab::Recaptcha.enabled? = recaptcha_tags diff --git a/app/views/users/terms/index.html.haml b/app/views/users/terms/index.html.haml index 33cddf63952..a869cf9cdee 100644 --- a/app/views/users/terms/index.html.haml +++ b/app/views/users/terms/index.html.haml @@ -2,16 +2,17 @@ .card-body.rendered-terms = markdown_field(@term, :terms) -.card-footer.footer-block.clearfix - - if can?(current_user, :accept_terms, @term) - .float-right - = button_to accept_term_path(@term, redirect_params), class: 'btn btn-success prepend-left-8' do - = _('Accept terms') - - else - .pull-right - = link_to root_path, class: 'btn btn-success prepend-left-8' do - = _('Continue') - - if can?(current_user, :decline_terms, @term) - .float-right - = button_to decline_term_path(@term, redirect_params), class: 'btn btn-default prepend-left-8' do - = _('Decline and sign out') +- if current_user + .card-footer.footer-block.clearfix + - if can?(current_user, :accept_terms, @term) + .float-right + = button_to accept_term_path(@term, redirect_params), class: 'btn btn-success prepend-left-8' do + = _('Accept terms') + - else + .pull-right + = link_to root_path, class: 'btn btn-success prepend-left-8' do + = _('Continue') + - if can?(current_user, :decline_terms, @term) + .float-right + = button_to decline_term_path(@term, redirect_params), class: 'btn btn-default prepend-left-8' do + = _('Decline and sign out') diff --git a/changelogs/unreleased/bvl-terms-on-registration.yml b/changelogs/unreleased/bvl-terms-on-registration.yml new file mode 100644 index 00000000000..3e6e499dd02 --- /dev/null +++ b/changelogs/unreleased/bvl-terms-on-registration.yml @@ -0,0 +1,5 @@ +--- +title: Users can accept terms during registration +merge_request: 19583 +author: +type: other diff --git a/doc/user/admin_area/settings/img/enforce_terms.png b/doc/user/admin_area/settings/img/enforce_terms.png index e5f0a2683b5..3d93e1cc891 100644 Binary files a/doc/user/admin_area/settings/img/enforce_terms.png and b/doc/user/admin_area/settings/img/enforce_terms.png differ diff --git a/doc/user/admin_area/settings/img/sign_up_terms.png b/doc/user/admin_area/settings/img/sign_up_terms.png new file mode 100644 index 00000000000..4cac9d426c9 Binary files /dev/null and b/doc/user/admin_area/settings/img/sign_up_terms.png differ diff --git a/doc/user/admin_area/settings/terms.md b/doc/user/admin_area/settings/terms.md index 8e1fb982aba..aa817c9a209 100644 --- a/doc/user/admin_area/settings/terms.md +++ b/doc/user/admin_area/settings/terms.md @@ -20,6 +20,19 @@ When an admin enables this feature, they will automattically be directed to the page to accept the terms themselves. After they accept, they will be directed back to the settings page. +## New registrations + +When this feature is enabled, a checkbox will be available in the +sign-up form. + +![Sign up form](img/sign_up_terms.png) + +This checkbox will be required during sign up. + +Users can review the terms entered in the admin panel before +accepting. The page will be opened in a new window so they can +continue their registration afterwards. + ## Accepting terms When this feature was enabled, the users that have not accepted the diff --git a/locale/gitlab.pot b/locale/gitlab.pot index bf0214401ef..3e3d15f5f8c 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: gitlab 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-29 09:43-0500\n" -"PO-Revision-Date: 2018-05-29 09:43-0500\n" +"POT-Creation-Date: 2018-06-08 18:19+0200\n" +"PO-Revision-Date: 2018-06-08 18:19+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -232,7 +232,7 @@ msgstr "" msgid "Account" msgstr "" -msgid "Account and limit settings" +msgid "Account and limit" msgstr "" msgid "Active" @@ -780,9 +780,6 @@ msgstr "" msgid "CI/CD settings" msgstr "" -msgid "CICD|A domain is required to use Auto Review Apps and Auto Deploy Stages." -msgstr "" - msgid "CICD|An explicit %{ci_file} needs to be specified before you can begin using Continuous Integration and Delivery." msgstr "" @@ -792,6 +789,18 @@ msgstr "" msgid "CICD|Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration." msgstr "" +msgid "CICD|Automatic deployment to staging, manual deployment to production" +msgstr "" + +msgid "CICD|Continuous deployment to production" +msgstr "" + +msgid "CICD|Deployment strategy" +msgstr "" + +msgid "CICD|Deployment strategy needs a domain name to work correctly." +msgstr "" + msgid "CICD|Disable Auto DevOps" msgstr "" @@ -813,6 +822,9 @@ msgstr "" msgid "CICD|The Auto DevOps pipeline configuration will be used when there is no %{ci_file} in the project." msgstr "" +msgid "CICD|You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages." +msgstr "" + msgid "Can run untagged jobs" msgstr "" @@ -2106,6 +2118,9 @@ msgstr "" msgid "Failed to update issues, please try again." msgstr "" +msgid "Failure" +msgstr "" + msgid "Feb" msgstr "" @@ -2344,6 +2359,12 @@ msgstr "" msgid "Housekeeping successfully started" msgstr "" +msgid "I accept the %{terms_link}" +msgstr "" + +msgid "I accept the|Terms of Service and Privacy Policy" +msgstr "" + msgid "IDE|Commit" msgstr "" @@ -2377,7 +2398,7 @@ msgstr "" msgid "Import repository" msgstr "" -msgid "Include a Terms of Service agreement that all users must accept." +msgid "Include a Terms of Service agreement and Privacy Policy that all users must accept." msgstr "" msgid "Install Runner on Kubernetes" @@ -3491,7 +3512,7 @@ msgstr "" msgid "Repository maintenance" msgstr "" -msgid "Repository mirror settings" +msgid "Repository mirror" msgstr "" msgid "Repository storage" @@ -3500,7 +3521,7 @@ msgstr "" msgid "Request Access" msgstr "" -msgid "Require all users to accept Terms of Service when they access GitLab." +msgid "Require all users to accept Terms of Service and Privacy Policy when they access GitLab." msgstr "" msgid "Reset git storage health information" @@ -3559,9 +3580,6 @@ msgstr "" msgid "Runners can be placed on separate users, servers, and even on your local machine." msgstr "" -msgid "Runners settings" -msgstr "" - msgid "Running" msgstr "" @@ -3873,6 +3891,15 @@ msgstr "" msgid "Specify the following URL during the Runner setup:" msgstr "" +<<<<<<< HEAD +======= +msgid "Squash commits" +msgstr "" + +msgid "Stage" +msgstr "" + +>>>>>>> 27045ce58e6... Merge branch 'bvl-terms-on-registration' into 'master' msgid "Stage all" msgstr "" @@ -4019,10 +4046,10 @@ msgstr "" msgid "Team" msgstr "" -msgid "Terms of Service" +msgid "Terms of Service Agreement and Privacy Policy" msgstr "" -msgid "Terms of Service Agreement" +msgid "Terms of Service and Privacy Policy" msgstr "" msgid "The Issue Tracker is the place to add things that need to be improved or solved in a project" @@ -4250,6 +4277,9 @@ msgstr "" msgid "Timeago|%s days remaining" msgstr "" +msgid "Timeago|%s hours ago" +msgstr "" + msgid "Timeago|%s hours remaining" msgstr "" @@ -4265,6 +4295,9 @@ msgstr "" msgid "Timeago|%s months remaining" msgstr "" +msgid "Timeago|%s seconds ago" +msgstr "" + msgid "Timeago|%s seconds remaining" msgstr "" @@ -4280,46 +4313,43 @@ msgstr "" msgid "Timeago|%s years remaining" msgstr "" -msgid "Timeago|1 day remaining" -msgstr "" - -msgid "Timeago|1 hour remaining" +msgid "Timeago|1 day ago" msgstr "" -msgid "Timeago|1 minute remaining" +msgid "Timeago|1 day remaining" msgstr "" -msgid "Timeago|1 month remaining" +msgid "Timeago|1 hour ago" msgstr "" -msgid "Timeago|1 week remaining" +msgid "Timeago|1 hour remaining" msgstr "" -msgid "Timeago|1 year remaining" +msgid "Timeago|1 minute ago" msgstr "" -msgid "Timeago|Past due" +msgid "Timeago|1 minute remaining" msgstr "" -msgid "Timeago|a day ago" +msgid "Timeago|1 month ago" msgstr "" -msgid "Timeago|a month ago" +msgid "Timeago|1 month remaining" msgstr "" -msgid "Timeago|a week ago" +msgid "Timeago|1 week ago" msgstr "" -msgid "Timeago|a year ago" +msgid "Timeago|1 week remaining" msgstr "" -msgid "Timeago|about %s hours ago" +msgid "Timeago|1 year ago" msgstr "" -msgid "Timeago|about a minute ago" +msgid "Timeago|1 year remaining" msgstr "" -msgid "Timeago|about an hour ago" +msgid "Timeago|Past due" msgstr "" msgid "Timeago|in %s days" @@ -4361,7 +4391,7 @@ msgstr "" msgid "Timeago|in 1 year" msgstr "" -msgid "Timeago|less than a minute ago" +msgid "Timeago|just now" msgstr "" msgid "Timeago|right now" @@ -4767,6 +4797,9 @@ msgstr "" msgid "You have reached your project limit" msgstr "" +msgid "You must accept our Terms of Service and privacy policy in order to register an account" +msgstr "" + msgid "You must have maintainer access to force delete a lock" msgstr "" diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index 346944fd5b0..898f3863008 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe RegistrationsController do + include TermsHelper + describe '#create' do let(:user_params) { { user: { name: 'new_user', username: 'new_username', email: 'new@user.com', password: 'Any_password' } } } @@ -67,6 +69,25 @@ describe RegistrationsController do expect(flash[:notice]).to include 'Welcome! You have signed up successfully.' end end + + context 'when terms are enforced' do + before do + enforce_terms + end + + it 'redirects back with a notice when the checkbox was not checked' do + post :create, user_params + + expect(flash[:alert]).to match /you must accept our terms/i + end + + it 'creates the user with agreement when terms are accepted' do + post :create, user_params.merge(terms_opt_in: '1') + + expect(subject.current_user).to be_present + expect(subject.current_user.terms_accepted?).to be(true) + end + end end describe '#destroy' do diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index dc025d82937..e7aca94db66 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -94,7 +94,7 @@ feature 'Admin updates settings' do accept_terms(admin) page.within('.as-terms') do - check 'Require all users to accept Terms of Service when they access GitLab.' + check 'Require all users to accept Terms of Service and Privacy Policy when they access GitLab.' fill_in 'Terms of Service Agreement', with: 'Be nice!' click_button 'Save changes' end diff --git a/spec/features/users/signup_spec.rb b/spec/features/users/signup_spec.rb index b5bd5c505f2..b51ca5d130b 100644 --- a/spec/features/users/signup_spec.rb +++ b/spec/features/users/signup_spec.rb @@ -140,7 +140,7 @@ describe 'Signup' do enforce_terms end - it 'asks the user to accept terms before going to the dashboard' do + it 'requires the user to check the checkbox' do visit root_path fill_in 'new_user_name', with: new_user.name @@ -148,11 +148,24 @@ describe 'Signup' do fill_in 'new_user_email', with: new_user.email fill_in 'new_user_email_confirmation', with: new_user.email fill_in 'new_user_password', with: new_user.password - click_button "Register" - expect_to_be_on_terms_page + click_button 'Register' + + expect(current_path).to eq new_user_session_path + expect(page).to have_content(/you must accept our terms of service/i) + end + + it 'asks the user to accept terms before going to the dashboard' do + visit root_path + + fill_in 'new_user_name', with: new_user.name + fill_in 'new_user_username', with: new_user.username + fill_in 'new_user_email', with: new_user.email + fill_in 'new_user_email_confirmation', with: new_user.email + fill_in 'new_user_password', with: new_user.password + check :terms_opt_in - click_button 'Accept terms' + click_button "Register" expect(current_path).to eq dashboard_projects_path end diff --git a/spec/features/users/terms_spec.rb b/spec/features/users/terms_spec.rb index af407c52917..5b2e7605c4d 100644 --- a/spec/features/users/terms_spec.rb +++ b/spec/features/users/terms_spec.rb @@ -3,12 +3,10 @@ require 'spec_helper' describe 'Users > Terms' do include TermsHelper - let(:user) { create(:user) } let!(:term) { create(:term, terms: 'By accepting, you promise to be nice!') } before do stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') - sign_in(user) end it 'shows the terms' do @@ -17,102 +15,119 @@ describe 'Users > Terms' do expect(page).to have_content('By accepting, you promise to be nice!') end - context 'declining the terms' do - it 'returns the user to the app' do - visit terms_path + it 'does not show buttons to accept, decline or sign out', :aggregate_failures do + visit terms_path + + expect(page).not_to have_css('.footer-block') + expect(page).not_to have_content('Accept terms') + expect(page).not_to have_content('Decline and sign out') + expect(page).not_to have_content('Continue') + end - click_button 'Decline and sign out' + context 'when signed in' do + let(:user) { create(:user) } - expect(page).not_to have_content(term.terms) - expect(user.reload.terms_accepted?).to be(false) + before do + sign_in(user) end - end - context 'accepting the terms' do - it 'returns the user to the app' do - visit terms_path + context 'declining the terms' do + it 'returns the user to the app' do + visit terms_path - click_button 'Accept terms' + click_button 'Decline and sign out' - expect(page).not_to have_content(term.terms) - expect(user.reload.terms_accepted?).to be(true) + expect(page).not_to have_content(term.terms) + expect(user.reload.terms_accepted?).to be(false) + end end - end - context 'when the user has already accepted the terms' do - before do - accept_terms(user) + context 'accepting the terms' do + it 'returns the user to the app' do + visit terms_path + + click_button 'Accept terms' + + expect(page).not_to have_content(term.terms) + expect(user.reload.terms_accepted?).to be(true) + end end - it 'allows the user to continue to the app' do - visit terms_path + context 'when the user has already accepted the terms' do + before do + accept_terms(user) + end + + it 'allows the user to continue to the app' do + visit terms_path - expect(page).to have_content "You have already accepted the Terms of Service as #{user.to_reference}" + expect(page).to have_content "You have already accepted the Terms of Service as #{user.to_reference}" - click_link 'Continue' + click_link 'Continue' - expect(current_path).to eq(root_path) + expect(current_path).to eq(root_path) + end end - end - context 'terms were enforced while session is active', :js do - let(:project) { create(:project) } + context 'terms were enforced while session is active', :js do + let(:project) { create(:project) } - before do - project.add_developer(user) - end + before do + project.add_developer(user) + end - it 'redirects to terms and back to where the user was going' do - visit project_path(project) + it 'redirects to terms and back to where the user was going' do + visit project_path(project) - enforce_terms + enforce_terms - within('.nav-sidebar') do - click_link 'Issues' - end + within('.nav-sidebar') do + click_link 'Issues' + end - expect_to_be_on_terms_page + expect_to_be_on_terms_page - click_button('Accept terms') + click_button('Accept terms') - expect(current_path).to eq(project_issues_path(project)) - end + expect(current_path).to eq(project_issues_path(project)) + end - # Disabled until https://gitlab.com/gitlab-org/gitlab-ce/issues/37162 is solved properly - xit 'redirects back to the page the user was trying to save' do - visit new_project_issue_path(project) + # Disabled until https://gitlab.com/gitlab-org/gitlab-ce/issues/37162 is solved properly + xit 'redirects back to the page the user was trying to save' do + visit new_project_issue_path(project) - fill_in :issue_title, with: 'Hello world, a new issue' - fill_in :issue_description, with: "We don't want to lose what the user typed" + fill_in :issue_title, with: 'Hello world, a new issue' + fill_in :issue_description, with: "We don't want to lose what the user typed" - enforce_terms + enforce_terms - click_button 'Submit issue' + click_button 'Submit issue' - expect(current_path).to eq(terms_path) + expect(current_path).to eq(terms_path) - click_button('Accept terms') + click_button('Accept terms') - expect(current_path).to eq(new_project_issue_path(project)) - expect(find_field('issue_title').value).to eq('Hello world, a new issue') - expect(find_field('issue_description').value).to eq("We don't want to lose what the user typed") + expect(current_path).to eq(new_project_issue_path(project)) + expect(find_field('issue_title').value).to eq('Hello world, a new issue') + expect(find_field('issue_description').value).to eq("We don't want to lose what the user typed") + end end - end - context 'when the terms are enforced' do - before do - enforce_terms - end + context 'when the terms are enforced' do + before do + enforce_terms + end - context 'signing out', :js do - it 'allows the user to sign out without a response' do - visit terms_path + context 'signing out', :js do + it 'allows the user to sign out without a response' do + visit terms_path - find('.header-user-dropdown-toggle').click - click_link('Sign out') + find('.header-user-dropdown-toggle').click + click_link('Sign out') - expect(page).to have_content('Sign in') - expect(page).to have_content('Register') + expect(page).to have_content('Sign in') + expect(page).to have_content('Register') + end end end end -- cgit v1.2.1 From 8ee8a0de512eddab6c137f41b0b2b3140b381485 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 13 Jun 2018 08:25:01 +0000 Subject: Merge branch 'fj-restore-users-v3-endpoint' into 'master' Restoring user v3 endpoint Closes #47565 See merge request gitlab-org/gitlab-ce!19661 --- .../unreleased/fj-restore-users-v3-endpoint.yml | 5 ++ lib/api/users.rb | 26 ++++---- spec/requests/api/users_spec.rb | 73 ++++++++++++---------- .../api/scopes/read_user_shared_examples.rb | 10 +-- 4 files changed, 65 insertions(+), 49 deletions(-) create mode 100644 changelogs/unreleased/fj-restore-users-v3-endpoint.yml diff --git a/changelogs/unreleased/fj-restore-users-v3-endpoint.yml b/changelogs/unreleased/fj-restore-users-v3-endpoint.yml new file mode 100644 index 00000000000..c5f952dfa88 --- /dev/null +++ b/changelogs/unreleased/fj-restore-users-v3-endpoint.yml @@ -0,0 +1,5 @@ +--- +title: Restore API v3 user endpoint +merge_request: +author: +type: changed diff --git a/lib/api/users.rb b/lib/api/users.rb index 14b8a796c8e..e8df2c5a74a 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -531,18 +531,22 @@ module API authenticate! end - desc 'Get the currently authenticated user' do - success Entities::UserPublic - end - get do - entity = - if current_user.admin? - Entities::UserWithAdmin - else - Entities::UserPublic - end + # Enabling /user endpoint for the v3 version to allow oauth + # authentication through this endpoint. + version %w(v3 v4), using: :path do + desc 'Get the currently authenticated user' do + success Entities::UserPublic + end + get do + entity = + if current_user.admin? + Entities::UserWithAdmin + else + Entities::UserPublic + end - present current_user, with: entity + present current_user, with: entity + end end desc "Get the currently authenticated user's SSH keys" do diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index 05637eb0729..c7678fe1474 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -1123,58 +1123,63 @@ describe API::Users do describe "GET /user" do let(:personal_access_token) { create(:personal_access_token, user: user).token } - context 'with regular user' do - context 'with personal access token' do - it 'returns 403 without private token when sudo is defined' do - get api("/user?private_token=#{personal_access_token}&sudo=123") + shared_examples 'get user info' do |version| + context 'with regular user' do + context 'with personal access token' do + it 'returns 403 without private token when sudo is defined' do + get api("/user?private_token=#{personal_access_token}&sudo=123", version: version) - expect(response).to have_gitlab_http_status(403) + expect(response).to have_gitlab_http_status(403) + end end - end - it 'returns current user without private token when sudo not defined' do - get api("/user", user) + it 'returns current user without private token when sudo not defined' do + get api("/user", user, version: version) - expect(response).to have_gitlab_http_status(200) - expect(response).to match_response_schema('public_api/v4/user/public') - expect(json_response['id']).to eq(user.id) - end + expect(response).to have_gitlab_http_status(200) + expect(response).to match_response_schema('public_api/v4/user/public') + expect(json_response['id']).to eq(user.id) + end - context "scopes" do - let(:path) { "/user" } - let(:api_call) { method(:api) } + context "scopes" do + let(:path) { "/user" } + let(:api_call) { method(:api) } - include_examples 'allows the "read_user" scope' + include_examples 'allows the "read_user" scope', version + end end - end - context 'with admin' do - let(:admin_personal_access_token) { create(:personal_access_token, user: admin).token } + context 'with admin' do + let(:admin_personal_access_token) { create(:personal_access_token, user: admin).token } - context 'with personal access token' do - it 'returns 403 without private token when sudo defined' do - get api("/user?private_token=#{admin_personal_access_token}&sudo=#{user.id}") + context 'with personal access token' do + it 'returns 403 without private token when sudo defined' do + get api("/user?private_token=#{admin_personal_access_token}&sudo=#{user.id}", version: version) - expect(response).to have_gitlab_http_status(403) - end + expect(response).to have_gitlab_http_status(403) + end - it 'returns initial current user without private token but with is_admin when sudo not defined' do - get api("/user?private_token=#{admin_personal_access_token}") + it 'returns initial current user without private token but with is_admin when sudo not defined' do + get api("/user?private_token=#{admin_personal_access_token}", version: version) - expect(response).to have_gitlab_http_status(200) - expect(response).to match_response_schema('public_api/v4/user/admin') - expect(json_response['id']).to eq(admin.id) + expect(response).to have_gitlab_http_status(200) + expect(response).to match_response_schema('public_api/v4/user/admin') + expect(json_response['id']).to eq(admin.id) + end end end - end - context 'with unauthenticated user' do - it "returns 401 error if user is unauthenticated" do - get api("/user") + context 'with unauthenticated user' do + it "returns 401 error if user is unauthenticated" do + get api("/user", version: version) - expect(response).to have_gitlab_http_status(401) + expect(response).to have_gitlab_http_status(401) + end end end + + it_behaves_like 'get user info', 'v3' + it_behaves_like 'get user info', 'v4' end describe "GET /user/keys" do diff --git a/spec/support/api/scopes/read_user_shared_examples.rb b/spec/support/api/scopes/read_user_shared_examples.rb index 06ae8792c61..d7cef137989 100644 --- a/spec/support/api/scopes/read_user_shared_examples.rb +++ b/spec/support/api/scopes/read_user_shared_examples.rb @@ -1,10 +1,12 @@ -shared_examples_for 'allows the "read_user" scope' do +shared_examples_for 'allows the "read_user" scope' do |api_version| + let(:version) { api_version || 'v4' } + context 'for personal access tokens' do context 'when the requesting token has the "api" scope' do let(:token) { create(:personal_access_token, scopes: ['api'], user: user) } it 'returns a "200" response' do - get api_call.call(path, user, personal_access_token: token) + get api_call.call(path, user, personal_access_token: token, version: version) expect(response).to have_gitlab_http_status(200) end @@ -14,7 +16,7 @@ shared_examples_for 'allows the "read_user" scope' do let(:token) { create(:personal_access_token, scopes: ['read_user'], user: user) } it 'returns a "200" response' do - get api_call.call(path, user, personal_access_token: token) + get api_call.call(path, user, personal_access_token: token, version: version) expect(response).to have_gitlab_http_status(200) end @@ -28,7 +30,7 @@ shared_examples_for 'allows the "read_user" scope' do end it 'returns a "403" response' do - get api_call.call(path, user, personal_access_token: token) + get api_call.call(path, user, personal_access_token: token, version: version) expect(response).to have_gitlab_http_status(403) end -- cgit v1.2.1 From 6b85b7ff0daae47ac0f9ee76d986e46a6cf22a34 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Wed, 13 Jun 2018 09:30:33 +0000 Subject: Merge branch 'docs-link-to-release-post-for-group-issue-board' into 'master' Link to release post for group issue board docs See merge request gitlab-org/gitlab-ce!19677 --- doc/user/project/issue_board.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index 7eab825fa32..aa2fcd82787 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -237,13 +237,15 @@ Issue Board, that is create/delete lists and drag issues around. ## Group Issue Board ->Introduced in GitLab 10.6 +> Introduced in [GitLab 10.6](https://about.gitlab.com/2018/03/22/gitlab-10-6-released/#single-group-issue-board-in-core-and-free) Group issue board is analogous to project-level issue board and it is accessible at the group navigation level. A group-level issue board allows you to view all issues from all projects in that group or descendant subgroups. Similarly, you can only filter by group labels for these boards. When updating milestones and labels for an issue through the sidebar update mechanism, again only group-level objects are available. +One group issue board per group was made available in GitLab 10.6 Core after multiple group issue boards were originally introduced in [GitLab 10.0 Premium](https://about.gitlab.com/2017/09/22/gitlab-10-0-released/#group-issue-boards). + ## Features per tier Different issue board features are available in different [GitLab tiers](https://about.gitlab.com/pricing/), as shown in the following table: -- cgit v1.2.1 From 79bcc95ac88f8a48a434106ed9e4e25510011af7 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 13 Jun 2018 09:47:38 +0000 Subject: Merge branch '47735-milestone-regression' into 'master' Resolve "Regressions for assigning group milestone from ancestor" Closes #47735 See merge request gitlab-org/gitlab-ce!19721 --- app/assets/javascripts/milestone_select.js | 2 +- lib/api/entities.rb | 4 ++++ lib/banzai/filter/milestone_reference_filter.rb | 2 +- lib/gitlab/url_builder.rb | 2 ++ .../api/schemas/public_api/v4/milestones.json | 3 ++- .../filter/milestone_reference_filter_spec.rb | 10 ++++++++- spec/lib/gitlab/url_builder_spec.rb | 25 ++++++++++++++++++++++ 7 files changed, 44 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/milestone_select.js b/app/assets/javascripts/milestone_select.js index f8b3d3061f0..d269c45203a 100644 --- a/app/assets/javascripts/milestone_select.js +++ b/app/assets/javascripts/milestone_select.js @@ -56,7 +56,7 @@ export default class MilestoneSelect { if (issueUpdateURL) { milestoneLinkTemplate = _.template( - '<%- title %>', + '<%- title %>', ); milestoneLinkNoneTemplate = 'None'; } diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 22afcb9edf2..3c9c87ac1c4 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -412,6 +412,10 @@ module API expose :state, :created_at, :updated_at expose :due_date expose :start_date + + expose :web_url do |milestone, _options| + Gitlab::UrlBuilder.build(milestone) + end end class IssueBasic < ProjectEntity diff --git a/lib/banzai/filter/milestone_reference_filter.rb b/lib/banzai/filter/milestone_reference_filter.rb index b144bd8cf54..858e790005c 100644 --- a/lib/banzai/filter/milestone_reference_filter.rb +++ b/lib/banzai/filter/milestone_reference_filter.rb @@ -65,7 +65,7 @@ module Banzai # We don't support IID lookups for group milestones, because IIDs can # clash between group and project milestones. if project.group && !params[:iid] - finder_params[:group_ids] = [project.group.id] + finder_params[:group_ids] = project.group.self_and_ancestors.select(:id) end MilestonesFinder.new(finder_params).find_by(params) diff --git a/lib/gitlab/url_builder.rb b/lib/gitlab/url_builder.rb index 824e2d7251f..e64033b0dba 100644 --- a/lib/gitlab/url_builder.rb +++ b/lib/gitlab/url_builder.rb @@ -26,6 +26,8 @@ module Gitlab project_snippet_url(object.project, object) when Snippet snippet_url(object) + when Milestone + milestone_url(object) else raise NotImplementedError.new("No URL builder defined for #{object.class}") end diff --git a/spec/fixtures/api/schemas/public_api/v4/milestones.json b/spec/fixtures/api/schemas/public_api/v4/milestones.json index c3c42b6ee60..448e97d6c85 100644 --- a/spec/fixtures/api/schemas/public_api/v4/milestones.json +++ b/spec/fixtures/api/schemas/public_api/v4/milestones.json @@ -13,7 +13,8 @@ "created_at": { "type": "date" }, "updated_at": { "type": "date" }, "start_date": { "type": "date" }, - "due_date": { "type": "date" } + "due_date": { "type": "date" }, + "web_url": { "type": "string" } }, "required": [ "id", "iid", "title", "description", "state", diff --git a/spec/lib/banzai/filter/milestone_reference_filter_spec.rb b/spec/lib/banzai/filter/milestone_reference_filter_spec.rb index f8fa9b2d13d..91d4a60ba95 100644 --- a/spec/lib/banzai/filter/milestone_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/milestone_reference_filter_spec.rb @@ -3,7 +3,8 @@ require 'spec_helper' describe Banzai::Filter::MilestoneReferenceFilter do include FilterSpecHelper - let(:group) { create(:group, :public) } + let(:parent_group) { create(:group, :public) } + let(:group) { create(:group, :public, parent: parent_group) } let(:project) { create(:project, :public, group: group) } it 'requires project context' do @@ -340,6 +341,13 @@ describe Banzai::Filter::MilestoneReferenceFilter do expect(doc.css('a')).to be_empty end + + it 'supports parent group references', :nested_groups do + milestone.update!(group: parent_group) + + doc = reference_filter("See #{reference}") + expect(doc.css('a').first.text).to eq(milestone.name) + end end context 'group context' do diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb index b81749cf428..9f495a5d50b 100644 --- a/spec/lib/gitlab/url_builder_spec.rb +++ b/spec/lib/gitlab/url_builder_spec.rb @@ -22,6 +22,31 @@ describe Gitlab::UrlBuilder do end end + context 'when passing a Milestone' do + let(:group) { create(:group) } + let(:project) { create(:project, :public, namespace: group) } + + context 'belonging to a project' do + it 'returns a proper URL' do + milestone = create(:milestone, project: project) + + url = described_class.build(milestone) + + expect(url).to eq "#{Settings.gitlab['url']}/#{milestone.project.full_path}/milestones/#{milestone.iid}" + end + end + + context 'belonging to a group' do + it 'returns a proper URL' do + milestone = create(:milestone, group: group) + + url = described_class.build(milestone) + + expect(url).to eq "#{Settings.gitlab['url']}/groups/#{milestone.group.full_path}/-/milestones/#{milestone.iid}" + end + end + end + context 'when passing a MergeRequest' do it 'returns a proper URL' do merge_request = build_stubbed(:merge_request, iid: 42) -- cgit v1.2.1 From 8eca55d99e21d491a0fed94257842a6f4f3f4434 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 13 Jun 2018 11:00:05 +0000 Subject: Merge branch '47679-fix-failed-jobs-tab-ie11-again' into 'master' Resolve "Table on Failed Jobs tab is overflowing in IE11 and sm screens" Closes #47679 See merge request gitlab-org/gitlab-ce!19743 --- app/assets/stylesheets/framework/tables.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/framework/tables.scss b/app/assets/stylesheets/framework/tables.scss index ba9de6941ac..339388392df 100644 --- a/app/assets/stylesheets/framework/tables.scss +++ b/app/assets/stylesheets/framework/tables.scss @@ -58,7 +58,7 @@ table { display: none; } - table, + &, tbody, td { display: block; -- cgit v1.2.1 From a1a8bd8b561f2923f1ea086ad9dc8dc7d3c7af10 Mon Sep 17 00:00:00 2001 From: Tim Zallmann Date: Wed, 13 Jun 2018 10:56:33 +0000 Subject: Merge branch 'jr-11-0-web-ide-docs' into 'master' Add Web IDE CI logs and MR switching docs See merge request gitlab-org/gitlab-ce!19723 --- doc/user/project/web_ide/index.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/user/project/web_ide/index.md b/doc/user/project/web_ide/index.md index 105d8a6ab61..b0143e45ab6 100644 --- a/doc/user/project/web_ide/index.md +++ b/doc/user/project/web_ide/index.md @@ -42,5 +42,26 @@ list. An additional review mode is available when you open a merge request, which shows you a preview of the merge request diff if you commit your changes. +## View CI job logs + +> [Introduced in](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19279) [GitLab Core][ce] 11.0. + +The Web IDE can be used to quickly fix failing tests by opening the branch or +merge request in the Web IDE and opening the logs of the failed job. The status +of all jobs for the most recent pipeline and job traces for the current commit +can be accessed by clicking the **Pipelines** button in the top right. + +The pipeline status is also shown at all times in the status bar in the bottom +left. + +## Switching merge requests + +> [Introduced in](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19318) [GitLab Core][ce] 11.0. + +Switching between your authored and assigned merge requests can be done without +leaving the Web IDE. Click the project name in the top left to open a list of +merge requests. You will need to commit or discard all your changes before +switching to a different merge request. + [ce]: https://about.gitlab.com/pricing/ [ee]: https://about.gitlab.com/pricing/ -- cgit v1.2.1 From 7f5b4aa14fed91be7905631b126eb6877c0b4364 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Wed, 13 Jun 2018 13:41:36 +0000 Subject: Merge branch '47501-link-scroll' into 'master' Resolve "Scrolling tabs are broken on profile, activity, and projects" Closes #47501 See merge request gitlab-org/gitlab-ce!19606 --- app/assets/stylesheets/framework/mixins.scss | 1 + .../framework/secondary_navigation_elements.scss | 2 ++ app/assets/stylesheets/pages/merge_requests.scss | 1 + app/assets/stylesheets/pages/projects.scss | 6 ---- app/views/projects/merge_requests/show.html.haml | 39 +++++++++++----------- 5 files changed, 23 insertions(+), 26 deletions(-) diff --git a/app/assets/stylesheets/framework/mixins.scss b/app/assets/stylesheets/framework/mixins.scss index d76cf8f8182..0b645eb811b 100644 --- a/app/assets/stylesheets/framework/mixins.scss +++ b/app/assets/stylesheets/framework/mixins.scss @@ -186,6 +186,7 @@ overflow-y: hidden; -webkit-overflow-scrolling: touch; display: flex; + flex-wrap: nowrap; &::-webkit-scrollbar { display: none; diff --git a/app/assets/stylesheets/framework/secondary_navigation_elements.scss b/app/assets/stylesheets/framework/secondary_navigation_elements.scss index 847fc8c0792..4e2cc498883 100644 --- a/app/assets/stylesheets/framework/secondary_navigation_elements.scss +++ b/app/assets/stylesheets/framework/secondary_navigation_elements.scss @@ -230,6 +230,8 @@ } .scrolling-tabs-container { + position: relative; + .merge-request-tabs-container & { overflow: hidden; } diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index 9eceb3e9a33..f50ca677800 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -678,6 +678,7 @@ .merge-request-tabs { display: flex; + flex-wrap: nowrap; margin-bottom: 0; padding: 0; } diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 22964163e95..caafda5fb05 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -354,12 +354,6 @@ min-width: 200px; } -.deploy-keys { - .scrolling-tabs-container { - position: relative; - } -} - .deploy-key { // Ensure that the fingerprint does not overflow on small screens .fingerprint { diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 01e38ffee20..2f1877a15c2 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -32,26 +32,25 @@ .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller .fade-left= icon('angle-left') .fade-right= icon('angle-right') - .nav-links.scrolling-tabs.nav.nav-tabs - %ul.merge-request-tabs.nav-tabs.nav - %li.notes-tab - = tab_link_for @merge_request, :show, force_link: @commit.present? do - Discussion - %span.badge.badge-pill= @merge_request.related_notes.user.count - - if @merge_request.source_project - %li.commits-tab - = tab_link_for @merge_request, :commits do - Commits - %span.badge.badge-pill= @commits_count - - if @pipelines.any? - %li.pipelines-tab - = tab_link_for @merge_request, :pipelines do - Pipelines - %span.badge.badge-pill.js-pipelines-mr-count= @pipelines.size - %li.diffs-tab - = tab_link_for @merge_request, :diffs do - Changes - %span.badge.badge-pill= @merge_request.diff_size + %ul.merge-request-tabs.nav-tabs.nav.nav-links.scrolling-tabs + %li.notes-tab + = tab_link_for @merge_request, :show, force_link: @commit.present? do + Discussion + %span.badge.badge-pill= @merge_request.related_notes.user.count + - if @merge_request.source_project + %li.commits-tab + = tab_link_for @merge_request, :commits do + Commits + %span.badge.badge-pill= @commits_count + - if @pipelines.any? + %li.pipelines-tab + = tab_link_for @merge_request, :pipelines do + Pipelines + %span.badge.badge-pill.js-pipelines-mr-count= @pipelines.size + %li.diffs-tab + = tab_link_for @merge_request, :diffs do + Changes + %span.badge.badge-pill= @merge_request.diff_size - if has_vue_discussions_cookie? #js-vue-discussion-counter -- cgit v1.2.1 From 426108e50c1968857d7b6bfd5e5ac73f162cc2bc Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 13 Jun 2018 15:12:57 +0000 Subject: Merge branch '47823-fix-issue-boards-label-list-creation' into 'master' Resolve "Board list creation is broken" Closes #47823 See merge request gitlab-org/gitlab-ce!19746 --- app/assets/javascripts/boards/models/list.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js index a79dd62e2e4..1f0fe7f9e85 100644 --- a/app/assets/javascripts/boards/models/list.js +++ b/app/assets/javascripts/boards/models/list.js @@ -55,7 +55,8 @@ class List { entityType = 'assignee_id'; } - return gl.boardService.createList(this.label.id) + return gl.boardService + .createList(entity.id, entityType) .then(res => res.data) .then(data => { this.id = data.id; -- cgit v1.2.1 From da1792488405d6a93a8cbc1d2cbde64d97a7d07f Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Wed, 13 Jun 2018 17:04:47 +0100 Subject: Fix conflicts in .pot file --- locale/gitlab.pot | 160 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 135 insertions(+), 25 deletions(-) diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 3e3d15f5f8c..8eff9b0d77a 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: gitlab 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-08 18:19+0200\n" -"PO-Revision-Date: 2018-06-08 18:19+0200\n" +"POT-Creation-Date: 2018-06-13 17:00+0100\n" +"PO-Revision-Date: 2018-06-13 17:00+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -232,7 +232,7 @@ msgstr "" msgid "Account" msgstr "" -msgid "Account and limit" +msgid "Account and limit settings" msgstr "" msgid "Active" @@ -370,7 +370,7 @@ msgstr "" msgid "An error occurred while getting projects" msgstr "" -msgid "An error occurred while importing project" +msgid "An error occurred while importing project: ${details}" msgstr "" msgid "An error occurred while loading commits" @@ -463,6 +463,9 @@ msgstr "" msgid "Assigned to :name" msgstr "" +msgid "Assigned to me" +msgstr "" + msgid "Assignee" msgstr "" @@ -616,9 +619,6 @@ msgstr "" msgid "Begin with the selected commit" msgstr "" -msgid "Blame" -msgstr "" - msgid "Branch (%{branch_count})" msgid_plural "Branches (%{branch_count})" msgstr[0] "" @@ -1053,6 +1053,9 @@ msgstr "" msgid "ClusterIntegration|Copy Ingress IP Address to clipboard" msgstr "" +msgid "ClusterIntegration|Copy Jupyter Hostname to clipboard" +msgstr "" + msgid "ClusterIntegration|Copy Kubernetes cluster name" msgstr "" @@ -1131,6 +1134,12 @@ msgstr "" msgid "ClusterIntegration|Integration status" msgstr "" +msgid "ClusterIntegration|Jupyter Hostname" +msgstr "" + +msgid "ClusterIntegration|JupyterHub" +msgstr "" + msgid "ClusterIntegration|Kubernetes cluster" msgstr "" @@ -1531,6 +1540,9 @@ msgstr "" msgid "ContainerRegistry|You can also use a %{deploy_token} for read-only access to the registry images." msgstr "" +msgid "Continue" +msgstr "" + msgid "Continuous Integration and Deployment" msgstr "" @@ -1570,6 +1582,9 @@ msgstr "" msgid "Copy reference to clipboard" msgstr "" +msgid "Copy to clipboard" +msgstr "" + msgid "Create" msgstr "" @@ -1639,6 +1654,9 @@ msgstr "" msgid "Created" msgstr "" +msgid "Created by me" +msgstr "" + msgid "Cron Timezone" msgstr "" @@ -1830,6 +1848,9 @@ msgstr "" msgid "DeployTokens|Your new project deploy token has been created." msgstr "" +msgid "Deprioritize label" +msgstr "" + msgid "Description" msgstr "" @@ -2022,6 +2043,9 @@ msgstr "" msgid "Error fetching contributors data." msgstr "" +msgid "Error fetching job trace" +msgstr "" + msgid "Error fetching labels." msgstr "" @@ -2040,6 +2064,9 @@ msgstr "" msgid "Error loading last commit." msgstr "" +msgid "Error loading merge requests." +msgstr "" + msgid "Error loading project data. Please try again." msgstr "" @@ -2171,6 +2198,9 @@ msgstr "" msgid "Format" msgstr "" +msgid "Found errors in your .gitlab-ci.yml:" +msgstr "" + msgid "From %{provider_title}" msgstr "" @@ -2219,10 +2249,10 @@ msgstr "" msgid "Gitaly" msgstr "" -msgid "Gitaly|Address" +msgid "Gitaly Servers" msgstr "" -msgid "Gitaly Servers" +msgid "Gitaly|Address" msgstr "" msgid "Go Back" @@ -2374,6 +2404,9 @@ msgstr "" msgid "IDE|Go back" msgstr "" +msgid "IDE|Open in file view" +msgstr "" + msgid "IDE|Review" msgstr "" @@ -2500,6 +2533,9 @@ msgstr "" msgid "Label" msgstr "" +msgid "Label actions dropdown" +msgstr "" + msgid "LabelSelect|%{firstLabelName} +%{remainingLabelCount} more" msgstr "" @@ -2515,6 +2551,9 @@ msgstr "" msgid "Labels can be applied to issues and merge requests to categorize them." msgstr "" +msgid "Labels can be applied to issues and merge requests." +msgstr "" + msgid "Labels|Promote label %{labelTitle} to Group Label?" msgstr "" @@ -2825,7 +2864,10 @@ msgstr "" msgid "No files found." msgstr "" -msgid "No labels created yet." +msgid "No merge requests found" +msgstr "" + +msgid "No messages were logged" msgstr "" msgid "No repository" @@ -2951,6 +2993,9 @@ msgstr "" msgid "Only project members can comment." msgstr "" +msgid "Open in Xcode" +msgstr "" + msgid "OpenedNDaysAgo|Opened" msgstr "" @@ -2963,6 +3008,9 @@ msgstr "" msgid "Options" msgstr "" +msgid "Other Labels" +msgstr "" + msgid "Otherwise it is recommended you start with one of the options below." msgstr "" @@ -3008,9 +3056,6 @@ msgstr "" msgid "Performance optimization" msgstr "" -msgid "Permalink" -msgstr "" - msgid "Permissions" msgstr "" @@ -3188,6 +3233,21 @@ msgstr "" msgid "Preferences" msgstr "" +msgid "Preferences|Navigation theme" +msgstr "" + +msgid "Prioritize" +msgstr "" + +msgid "Prioritize label" +msgstr "" + +msgid "Prioritized Labels" +msgstr "" + +msgid "Prioritized label" +msgstr "" + msgid "Private - Project access must be granted explicitly to each user." msgstr "" @@ -3413,10 +3473,10 @@ msgstr "" msgid "Promote these project milestones into a group milestone." msgstr "" -msgid "Promote to Group Label" +msgid "Promote to Group Milestone" msgstr "" -msgid "Promote to Group Milestone" +msgid "Promote to group label" msgstr "" msgid "Protip:" @@ -3440,9 +3500,6 @@ msgstr "" msgid "Quick actions can be used in the issues description and comment boxes." msgstr "" -msgid "Raw" -msgstr "" - msgid "Read more" msgstr "" @@ -3503,6 +3560,9 @@ msgstr "" msgid "Remove avatar" msgstr "" +msgid "Remove priority" +msgstr "" + msgid "Remove project" msgstr "" @@ -3512,7 +3572,7 @@ msgstr "" msgid "Repository maintenance" msgstr "" -msgid "Repository mirror" +msgid "Repository mirror settings" msgstr "" msgid "Repository storage" @@ -3580,6 +3640,9 @@ msgstr "" msgid "Runners can be placed on separate users, servers, and even on your local machine." msgstr "" +msgid "Runners settings" +msgstr "" + msgid "Running" msgstr "" @@ -3607,6 +3670,12 @@ msgstr "" msgid "Scheduling Pipelines" msgstr "" +msgid "Scroll to bottom" +msgstr "" + +msgid "Scroll to top" +msgstr "" + msgid "Search" msgstr "" @@ -3622,6 +3691,9 @@ msgstr "" msgid "Search for projects, issues, etc." msgstr "" +msgid "Search merge requests" +msgstr "" + msgid "Search milestones" msgstr "" @@ -3730,6 +3802,9 @@ msgstr "" msgid "Show command" msgstr "" +msgid "Show complete raw log" +msgstr "" + msgid "Show parent pages" msgstr "" @@ -3765,9 +3840,6 @@ msgstr "" msgid "Something went wrong when toggling the button" msgstr "" -msgid "Something went wrong while fetching the latest pipeline status." -msgstr "" - msgid "Something went wrong while fetching the projects." msgstr "" @@ -3891,15 +3963,12 @@ msgstr "" msgid "Specify the following URL during the Runner setup:" msgstr "" -<<<<<<< HEAD -======= msgid "Squash commits" msgstr "" msgid "Stage" msgstr "" ->>>>>>> 27045ce58e6... Merge branch 'bvl-terms-on-registration' into 'master' msgid "Stage all" msgstr "" @@ -3912,6 +3981,9 @@ msgstr "" msgid "Staged %{type}" msgstr "" +msgid "Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging." +msgstr "" + msgid "StarProject|Star" msgstr "" @@ -3951,6 +4023,15 @@ msgstr "" msgid "Subgroups" msgstr "" +msgid "Subscribe" +msgstr "" + +msgid "Subscribe at group level" +msgstr "" + +msgid "Subscribe at project level" +msgstr "" + msgid "Switch branch/tag" msgstr "" @@ -4497,6 +4578,15 @@ msgstr "" msgid "Unstar" msgstr "" +msgid "Unsubscribe" +msgstr "" + +msgid "Unsubscribe at group level" +msgstr "" + +msgid "Unsubscribe at project level" +msgstr "" + msgid "Unverified" msgstr "" @@ -4560,9 +4650,15 @@ msgstr "" msgid "View group labels" msgstr "" +msgid "View jobs" +msgstr "" + msgid "View labels" msgstr "" +msgid "View log" +msgstr "" + msgid "View open merge request" msgstr "" @@ -4773,6 +4869,9 @@ msgstr "" msgid "You can also star a label to make it a priority label." msgstr "" +msgid "You can also test your .gitlab-ci.yml in the %{linkStart}Lint%{linkEnd}" +msgstr "" + msgid "You can easily install a Runner on a Kubernetes cluster. %{link_to_help_page}" msgstr "" @@ -4791,9 +4890,15 @@ msgstr "" msgid "You cannot write to this read-only GitLab instance." msgstr "" +msgid "You do not have any assigned merge requests" +msgstr "" + msgid "You have no permissions" msgstr "" +msgid "You have not created any merge requests" +msgstr "" + msgid "You have reached your project limit" msgstr "" @@ -5129,3 +5234,8 @@ msgstr "" msgid "with %{additions} additions, %{deletions} deletions." msgstr "" + +msgid "within %d minute " +msgid_plural "within %d minutes " +msgstr[0] "" +msgstr[1] "" -- cgit v1.2.1