Commit e0727708 authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'ce-to-ee-2018-06-19' into 'master'

CE upstream - 2018-06-19 18:21 UTC

See merge request gitlab-org/gitlab-ee!6188
parents 3f2833b9 a69c419a
...@@ -983,8 +983,6 @@ lint:javascript:report: ...@@ -983,8 +983,6 @@ lint:javascript:report:
- setup-test-env - setup-test-env
before_script: [] before_script: []
script: script:
- date
- find app/ spec/ -name '*.js' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files
- date - date
- yarn run eslint-report || true # ignore exit code - yarn run eslint-report || true # ignore exit code
artifacts: artifacts:
......
...@@ -170,7 +170,6 @@ export default { ...@@ -170,7 +170,6 @@ export default {
:author="author" :author="author"
:created-at="note.created_at" :created-at="note.created_at"
:note-id="note.id" :note-id="note.id"
action-text="commented"
/> />
<note-actions <note-actions
:author-id="author.id" :author-id="author.id"
......
...@@ -89,6 +89,11 @@ a { ...@@ -89,6 +89,11 @@ a {
color: $gl-link-color; color: $gl-link-color;
} }
a:not(.btn):focus,
a:not(.btn):active {
text-decoration: underline;
}
hr { hr {
overflow: hidden; overflow: hidden;
} }
......
...@@ -193,6 +193,7 @@ ...@@ -193,6 +193,7 @@
&:focus { &:focus {
background: $link-active-background; background: $link-active-background;
color: $gl-text-color; color: $gl-text-color;
text-decoration: none;
} }
} }
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
.btn { .btn {
font-size: $gl-font-size; font-size: $gl-font-size;
max-height: 26px;
&[disabled] { &[disabled] {
opacity: 0.3; opacity: 0.3;
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
= note.author.to_reference = note.author.to_reference
%span.note-headline-light %span.note-headline-light
%span.note-headline-meta %span.note-headline-meta
- unless note.system
commented
- if note.system - if note.system
%span.system-note-message %span.system-note-message
= markdown_field(note, :note) = markdown_field(note, :note)
......
---
title: Expose whether current user can push into a branch on branches API
merge_request:
author:
type: added
...@@ -29,6 +29,7 @@ Example response: ...@@ -29,6 +29,7 @@ Example response:
"protected": true, "protected": true,
"developers_can_push": false, "developers_can_push": false,
"developers_can_merge": false, "developers_can_merge": false,
"can_push": true,
"commit": { "commit": {
"author_email": "john@example.com", "author_email": "john@example.com",
"author_name": "John Smith", "author_name": "John Smith",
...@@ -76,6 +77,7 @@ Example response: ...@@ -76,6 +77,7 @@ Example response:
"protected": true, "protected": true,
"developers_can_push": false, "developers_can_push": false,
"developers_can_merge": false, "developers_can_merge": false,
"can_push": true,
"commit": { "commit": {
"author_email": "john@example.com", "author_email": "john@example.com",
"author_name": "John Smith", "author_name": "John Smith",
...@@ -140,7 +142,8 @@ Example response: ...@@ -140,7 +142,8 @@ Example response:
"merged": false, "merged": false,
"protected": true, "protected": true,
"developers_can_push": true, "developers_can_push": true,
"developers_can_merge": true "developers_can_merge": true,
"can_push": true
} }
``` ```
...@@ -188,7 +191,8 @@ Example response: ...@@ -188,7 +191,8 @@ Example response:
"merged": false, "merged": false,
"protected": false, "protected": false,
"developers_can_push": false, "developers_can_push": false,
"developers_can_merge": false "developers_can_merge": false,
"can_push": true
} }
``` ```
...@@ -231,7 +235,8 @@ Example response: ...@@ -231,7 +235,8 @@ Example response:
"merged": false, "merged": false,
"protected": false, "protected": false,
"developers_can_push": false, "developers_can_push": false,
"developers_can_merge": false "developers_can_merge": false,
"can_push": true
} }
``` ```
......
...@@ -156,7 +156,7 @@ added directly to your configured cluster. Those applications are needed for ...@@ -156,7 +156,7 @@ added directly to your configured cluster. Those applications are needed for
| [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) | 10.2+ | Ingress can provide load balancing, SSL termination, and name-based virtual hosting. It acts as a web proxy for your applications and is useful if you want to use [Auto DevOps] or deploy your own web apps. | | [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) | 10.2+ | Ingress can provide load balancing, SSL termination, and name-based virtual hosting. It acts as a web proxy for your applications and is useful if you want to use [Auto DevOps] or deploy your own web apps. |
| [Prometheus](https://prometheus.io/docs/introduction/overview/) | 10.4+ | Prometheus is an open-source monitoring and alerting system useful to supervise your deployed applications | | [Prometheus](https://prometheus.io/docs/introduction/overview/) | 10.4+ | Prometheus is an open-source monitoring and alerting system useful to supervise your deployed applications |
| [GitLab Runner](https://docs.gitlab.com/runner/) | 10.6+ | GitLab Runner is the open source project that is used to run your jobs and send the results back to GitLab. It is used in conjunction with [GitLab CI/CD](https://about.gitlab.com/features/gitlab-ci-cd/), the open-source continuous integration service included with GitLab that coordinates the jobs. When installing the GitLab Runner via the applications, it will run in **privileged mode** by default. Make sure you read the [security implications](#security-implications) before doing so. | | [GitLab Runner](https://docs.gitlab.com/runner/) | 10.6+ | GitLab Runner is the open source project that is used to run your jobs and send the results back to GitLab. It is used in conjunction with [GitLab CI/CD](https://about.gitlab.com/features/gitlab-ci-cd/), the open-source continuous integration service included with GitLab that coordinates the jobs. When installing the GitLab Runner via the applications, it will run in **privileged mode** by default. Make sure you read the [security implications](#security-implications) before doing so. |
| [JupyterHub](http://jupyter.org/) | 11.0+ | The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. | | [JupyterHub](http://jupyter.org/) | 11.0+ | [JupyterHub](https://jupyterhub.readthedocs.io/en/stable/) is a multi-user service for managing notebooks across a team. [Jupyter Notebooks](https://jupyter-notebook.readthedocs.io/en/latest/) provide a web-based interactive programming environment used for data analysis, visualization, and machine learning. **Note**: Authentication will be enabled for any user of the GitLab server via OAuth2. HTTPS will be supported in a future release. |
## Getting the external IP address ## Getting the external IP address
......
...@@ -349,6 +349,10 @@ module API ...@@ -349,6 +349,10 @@ module API
expose :developers_can_merge do |repo_branch, options| expose :developers_can_merge do |repo_branch, options|
options[:project].protected_branches.developers_can?(:merge, repo_branch.name) options[:project].protected_branches.developers_can?(:merge, repo_branch.name)
end end
expose :can_push do |repo_branch, options|
Gitlab::UserAccess.new(options[:current_user], project: options[:project]).can_push_to_branch?(repo_branch.name)
end
end end
class TreeObject < Grape::Entity class TreeObject < Grape::Entity
......
...@@ -8,8 +8,8 @@ msgid "" ...@@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gitlab 1.0.0\n" "Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-19 13:14+0200\n" "POT-Creation-Date: 2018-06-20 09:05+0200\n"
"PO-Revision-Date: 2018-06-19 13:14+0200\n" "PO-Revision-Date: 2018-06-20 09:05+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
...@@ -1414,10 +1414,10 @@ msgstr "" ...@@ -1414,10 +1414,10 @@ msgstr ""
msgid "ClusterIntegration|Learn more about %{help_link_start_machine_type}machine types%{help_link_end} and %{help_link_start_pricing}pricing%{help_link_end}." msgid "ClusterIntegration|Learn more about %{help_link_start_machine_type}machine types%{help_link_end} and %{help_link_start_pricing}pricing%{help_link_end}."
msgstr "" msgstr ""
msgid "ClusterIntegration|Learn more about %{help_link_start}zones%{help_link_end}." msgid "ClusterIntegration|Learn more about %{help_link_start}Kubernetes%{help_link_end}."
msgstr "" msgstr ""
msgid "ClusterIntegration|Learn more about %{link_to_documentation}" msgid "ClusterIntegration|Learn more about %{help_link_start}zones%{help_link_end}."
msgstr "" msgstr ""
msgid "ClusterIntegration|Learn more about environments" msgid "ClusterIntegration|Learn more about environments"
...@@ -2625,12 +2625,6 @@ msgstr "" ...@@ -2625,12 +2625,6 @@ msgstr ""
msgid "GeoNodes|Full" msgid "GeoNodes|Full"
msgstr "" msgstr ""
msgid "Gitaly Servers"
msgstr ""
msgid "Gitaly|Address"
msgstr ""
msgid "GeoNodes|GitLab version" msgid "GeoNodes|GitLab version"
msgstr "" msgstr ""
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"dev-server": "nodemon -w 'config/webpack.config.js' --exec 'webpack-dev-server --config config/webpack.config.js'", "dev-server": "nodemon -w 'config/webpack.config.js' --exec 'webpack-dev-server --config config/webpack.config.js'",
"eslint": "eslint --max-warnings 0 --ext .js,.vue .", "eslint": "eslint --max-warnings 0 --ext .js,.vue .",
"eslint-fix": "eslint --max-warnings 0 --ext .js,.vue --fix .", "eslint-fix": "eslint --max-warnings 0 --ext .js,.vue --fix .",
"eslint-report": "eslint --max-warnings 0 --ext .js,.vue --format html --output-file ./eslint-report.html .", "eslint-report": "eslint --max-warnings 0 --ext .js,.vue --format html --output-file ./eslint-report.html --no-inline-config .",
"karma": "BABEL_ENV=${BABEL_ENV:=karma} karma start --single-run true config/karma.config.js", "karma": "BABEL_ENV=${BABEL_ENV:=karma} karma start --single-run true config/karma.config.js",
"karma-coverage": "BABEL_ENV=coverage karma start --single-run true config/karma.config.js", "karma-coverage": "BABEL_ENV=coverage karma start --single-run true config/karma.config.js",
"karma-start": "BABEL_ENV=karma karma start config/karma.config.js", "karma-start": "BABEL_ENV=karma karma start config/karma.config.js",
......
...@@ -26,53 +26,58 @@ module QA ...@@ -26,53 +26,58 @@ module QA
end end
def initialize def initialize
# The login page is usually the entry point for all the scenarios so
# we need to wait for the instance to start. That said, in some cases
# we are already logged-in so we check both cases here.
wait(max: 500) do wait(max: 500) do
page.has_css?('.application') page.has_css?('.login-page') ||
end Page::Menu::Main.act { has_personal_area? }
end
def set_initial_password_if_present
if page.has_content?('Change your password')
fill_in :user_password, with: Runtime::User.password
fill_in :user_password_confirmation, with: Runtime::User.password
click_button 'Change your password'
end end
end end
def sign_in_using_credentials def sign_in_using_credentials
# Don't try to log-in if we're already logged-in
return if Page::Menu::Main.act { has_personal_area? }
using_wait_time 0 do
set_initial_password_if_present
if Runtime::User.ldap_user? if Runtime::User.ldap_user?
sign_in_using_ldap_credentials sign_in_using_ldap_credentials
else else
sign_in_using_gitlab_credentials sign_in_using_gitlab_credentials
end end
end end
end
def sign_in_using_ldap_credentials def self.path
using_wait_time 0 do '/users/sign_in'
set_initial_password_if_present end
private
def sign_in_using_ldap_credentials
click_link 'LDAP' click_link 'LDAP'
fill_in :username, with: Runtime::User.ldap_username fill_in :username, with: Runtime::User.ldap_username
fill_in :password, with: Runtime::User.ldap_password fill_in :password, with: Runtime::User.ldap_password
click_button 'Sign in' click_button 'Sign in'
end end
end
def sign_in_using_gitlab_credentials def sign_in_using_gitlab_credentials
using_wait_time 0 do
set_initial_password_if_present
click_link 'Standard' if page.has_content?('LDAP') click_link 'Standard' if page.has_content?('LDAP')
fill_in :user_login, with: Runtime::User.name fill_in :user_login, with: Runtime::User.name
fill_in :user_password, with: Runtime::User.password fill_in :user_password, with: Runtime::User.password
click_button 'Sign in' click_button 'Sign in'
end end
end
def self.path def set_initial_password_if_present
'/users/sign_in' return unless page.has_content?('Change your password')
fill_in :user_password, with: Runtime::User.password
fill_in :user_password_confirmation, with: Runtime::User.password
click_button 'Change your password'
end end
end end
end end
......
...@@ -55,7 +55,8 @@ module QA ...@@ -55,7 +55,8 @@ module QA
end end
def has_personal_area? def has_personal_area?
page.has_selector?('.qa-user-avatar') # No need to wait, either we're logged-in, or not.
using_wait_time(0) { page.has_selector?('.qa-user-avatar') }
end end
private private
......
...@@ -65,7 +65,11 @@ feature 'Dashboard Groups page', :js do ...@@ -65,7 +65,11 @@ feature 'Dashboard Groups page', :js do
fill_in 'filter', with: group.name fill_in 'filter', with: group.name
wait_for_requests wait_for_requests
expect(page).to have_content(group.name)
expect(page).not_to have_content(nested_group.parent.name)
fill_in 'filter', with: '' fill_in 'filter', with: ''
page.find('[name="filter"]').send_keys(:enter)
wait_for_requests wait_for_requests
expect(page).to have_content(group.name) expect(page).to have_content(group.name)
......
...@@ -35,7 +35,11 @@ describe 'Explore Groups page', :js do ...@@ -35,7 +35,11 @@ describe 'Explore Groups page', :js do
fill_in 'filter', with: group.name fill_in 'filter', with: group.name
wait_for_requests wait_for_requests
expect(page).to have_content(group.full_name)
expect(page).not_to have_content(public_group.full_name)
fill_in 'filter', with: "" fill_in 'filter', with: ""
page.find('[name="filter"]').send_keys(:enter)
wait_for_requests wait_for_requests
expect(page).to have_content(group.full_name) expect(page).to have_content(group.full_name)
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
"merged": { "type": "boolean" }, "merged": { "type": "boolean" },
"protected": { "type": "boolean" }, "protected": { "type": "boolean" },
"developers_can_push": { "type": "boolean" }, "developers_can_push": { "type": "boolean" },
"developers_can_merge": { "type": "boolean" } "developers_can_merge": { "type": "boolean" },
"can_push": { "type": "boolean" }
}, },
"additionalProperties": false "additionalProperties": false
} }
...@@ -32,7 +32,6 @@ describe('issue_note', () => { ...@@ -32,7 +32,6 @@ describe('issue_note', () => {
it('should render note header content', () => { it('should render note header content', () => {
expect(vm.$el.querySelector('.note-header .note-header-author-name').textContent.trim()).toEqual(note.author.name); expect(vm.$el.querySelector('.note-header .note-header-author-name').textContent.trim()).toEqual(note.author.name);
expect(vm.$el.querySelector('.note-header .note-headline-meta').textContent.trim()).toContain('commented');
}); });
it('should render note actions', () => { it('should render note actions', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment