Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
370d86cb
Commit
370d86cb
authored
Feb 14, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
2056c7de
12058fbe
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
5 deletions
+77
-5
app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue
...vascripts/ide/components/commit_sidebar/editor_header.vue
+1
-1
app/assets/javascripts/vue_shared/components/changed_file_icon.vue
...s/javascripts/vue_shared/components/changed_file_icon.vue
+11
-1
changelogs/unreleased/filter-note-parameters.yml
changelogs/unreleased/filter-note-parameters.yml
+5
-0
changelogs/unreleased/web-ide-commit-header-icon-alignment-fix.yml
...s/unreleased/web-ide-commit-header-icon-alignment-fix.yml
+5
-0
config/application.rb
config/application.rb
+1
-1
config/webpack.config.js
config/webpack.config.js
+1
-0
spec/config/application_spec.rb
spec/config/application_spec.rb
+34
-0
spec/javascripts/vue_shared/components/changed_file_icon_spec.js
...vascripts/vue_shared/components/changed_file_icon_spec.js
+19
-2
No files found.
app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue
View file @
370d86cb
...
@@ -44,7 +44,7 @@ export default {
...
@@ -44,7 +44,7 @@ export default {
<div
class=
"d-flex ide-commit-editor-header align-items-center"
>
<div
class=
"d-flex ide-commit-editor-header align-items-center"
>
<file-icon
:file-name=
"activeFile.name"
:size=
"16"
class=
"mr-2"
/>
<file-icon
:file-name=
"activeFile.name"
:size=
"16"
class=
"mr-2"
/>
<strong
class=
"mr-2"
>
{{
activeFile
.
path
}}
</strong>
<strong
class=
"mr-2"
>
{{
activeFile
.
path
}}
</strong>
<changed-file-icon
:file=
"activeFile"
class=
"ml-0
"
/>
<changed-file-icon
:file=
"activeFile"
:is-centered=
"false
"
/>
<div
class=
"ml-auto"
>
<div
class=
"ml-auto"
>
<button
<button
v-if=
"!isStaged"
v-if=
"!isStaged"
...
...
app/assets/javascripts/vue_shared/components/changed_file_icon.vue
View file @
370d86cb
...
@@ -37,6 +37,11 @@ export default {
...
@@ -37,6 +37,11 @@ export default {
required
:
false
,
required
:
false
,
default
:
12
,
default
:
12
,
},
},
isCentered
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
,
},
},
},
computed
:
{
computed
:
{
changedIcon
()
{
changedIcon
()
{
...
@@ -78,7 +83,12 @@ export default {
...
@@ -78,7 +83,12 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<span
v-gl-tooltip
.
right
:title=
"tooltipTitle"
class=
"file-changed-icon ml-auto"
>
<span
v-gl-tooltip
.
right
:title=
"tooltipTitle"
:class=
"
{ 'ml-auto': isCentered }"
class="file-changed-icon"
>
<icon
v-if=
"showIcon"
:name=
"changedIcon"
:size=
"size"
:css-classes=
"changedIconClass"
/>
<icon
v-if=
"showIcon"
:name=
"changedIcon"
:size=
"size"
:css-classes=
"changedIconClass"
/>
</span>
</span>
</
template
>
</
template
>
...
...
changelogs/unreleased/filter-note-parameters.yml
0 → 100644
View file @
370d86cb
---
title
:
Include note in the Rails filter_parameters configuration
merge_request
:
25238
author
:
type
:
other
changelogs/unreleased/web-ide-commit-header-icon-alignment-fix.yml
0 → 100644
View file @
370d86cb
---
title
:
Fixed alignment of changed icon in Web IDE
merge_request
:
author
:
type
:
fixed
config/application.rb
View file @
370d86cb
...
@@ -114,7 +114,7 @@ module Gitlab
...
@@ -114,7 +114,7 @@ module Gitlab
#
#
# NOTE: It is **IMPORTANT** to also update gitlab-workhorse's filter when adding parameters here to not
# NOTE: It is **IMPORTANT** to also update gitlab-workhorse's filter when adding parameters here to not
# introduce another security vulnerability: https://gitlab.com/gitlab-org/gitlab-workhorse/issues/182
# introduce another security vulnerability: https://gitlab.com/gitlab-org/gitlab-workhorse/issues/182
config
.
filter_parameters
+=
[
/token$/
,
/password/
,
/secret/
,
/key$/
]
config
.
filter_parameters
+=
[
/token$/
,
/password/
,
/secret/
,
/key$/
,
/^note$/
,
/^text$/
]
config
.
filter_parameters
+=
%i(
config
.
filter_parameters
+=
%i(
certificate
certificate
encrypted_key
encrypted_key
...
...
config/webpack.config.js
View file @
370d86cb
...
@@ -165,6 +165,7 @@ module.exports = {
...
@@ -165,6 +165,7 @@ module.exports = {
loader
:
'
worker-loader
'
,
loader
:
'
worker-loader
'
,
options
:
{
options
:
{
name
:
'
[name].[hash:8].worker.js
'
,
name
:
'
[name].[hash:8].worker.js
'
,
inline
:
IS_DEV_SERVER
,
},
},
},
},
'
babel-loader
'
,
'
babel-loader
'
,
...
...
spec/config/application_spec.rb
0 → 100644
View file @
370d86cb
# frozen_string_literal: true
require
'spec_helper'
describe
Gitlab
::
Application
do
# rubocop:disable RSpec/FilePath
using
RSpec
::
Parameterized
::
TableSyntax
FILTERED_PARAM
=
ActionDispatch
::
Http
::
ParameterFilter
::
FILTERED
context
'when parameters are logged'
do
describe
'rails does not leak confidential parameters'
do
def
request_for_url
(
input_url
)
env
=
Rack
::
MockRequest
.
env_for
(
input_url
)
env
[
'action_dispatch.parameter_filter'
]
=
described_class
.
config
.
filter_parameters
ActionDispatch
::
Request
.
new
(
env
)
end
where
(
:input_url
,
:output_query
)
do
'/'
|
{}
'/?safe=1'
|
{
'safe'
=>
'1'
}
'/?private_token=secret'
|
{
'private_token'
=>
FILTERED_PARAM
}
'/?mixed=1&private_token=secret'
|
{
'mixed'
=>
'1'
,
'private_token'
=>
FILTERED_PARAM
}
'/?note=secret¬eable=1&prefix_note=2'
|
{
'note'
=>
FILTERED_PARAM
,
'noteable'
=>
'1'
,
'prefix_note'
=>
'2'
}
'/?note[note]=secret&target_type=1'
|
{
'note'
=>
FILTERED_PARAM
,
'target_type'
=>
'1'
}
'/?safe[note]=secret&target_type=1'
|
{
'safe'
=>
{
'note'
=>
FILTERED_PARAM
},
'target_type'
=>
'1'
}
end
with_them
do
it
{
expect
(
request_for_url
(
input_url
).
filtered_parameters
).
to
eq
(
output_query
)
}
end
end
end
end
spec/javascripts/vue_shared/components/changed_file_icon_spec.js
View file @
370d86cb
...
@@ -5,27 +5,40 @@ import createComponent from 'spec/helpers/vue_mount_component_helper';
...
@@ -5,27 +5,40 @@ import createComponent from 'spec/helpers/vue_mount_component_helper';
describe
(
'
Changed file icon
'
,
()
=>
{
describe
(
'
Changed file icon
'
,
()
=>
{
let
vm
;
let
vm
;
beforeEach
(()
=>
{
function
factory
(
props
=
{})
{
const
component
=
Vue
.
extend
(
changedFileIcon
);
const
component
=
Vue
.
extend
(
changedFileIcon
);
vm
=
createComponent
(
component
,
{
vm
=
createComponent
(
component
,
{
...
props
,
file
:
{
file
:
{
tempFile
:
false
,
tempFile
:
false
,
changed
:
true
,
changed
:
true
,
},
},
});
});
}
);
}
afterEach
(()
=>
{
afterEach
(()
=>
{
vm
.
$destroy
();
vm
.
$destroy
();
});
});
it
(
'
centers icon
'
,
()
=>
{
factory
({
isCentered
:
true
,
});
expect
(
vm
.
$el
.
classList
).
toContain
(
'
ml-auto
'
);
});
describe
(
'
changedIcon
'
,
()
=>
{
describe
(
'
changedIcon
'
,
()
=>
{
it
(
'
equals file-modified when not a temp file and has changes
'
,
()
=>
{
it
(
'
equals file-modified when not a temp file and has changes
'
,
()
=>
{
factory
();
expect
(
vm
.
changedIcon
).
toBe
(
'
file-modified
'
);
expect
(
vm
.
changedIcon
).
toBe
(
'
file-modified
'
);
});
});
it
(
'
equals file-addition when a temp file
'
,
()
=>
{
it
(
'
equals file-addition when a temp file
'
,
()
=>
{
factory
();
vm
.
file
.
tempFile
=
true
;
vm
.
file
.
tempFile
=
true
;
expect
(
vm
.
changedIcon
).
toBe
(
'
file-addition
'
);
expect
(
vm
.
changedIcon
).
toBe
(
'
file-addition
'
);
...
@@ -34,10 +47,14 @@ describe('Changed file icon', () => {
...
@@ -34,10 +47,14 @@ describe('Changed file icon', () => {
describe
(
'
changedIconClass
'
,
()
=>
{
describe
(
'
changedIconClass
'
,
()
=>
{
it
(
'
includes file-modified when not a temp file
'
,
()
=>
{
it
(
'
includes file-modified when not a temp file
'
,
()
=>
{
factory
();
expect
(
vm
.
changedIconClass
).
toContain
(
'
file-modified
'
);
expect
(
vm
.
changedIconClass
).
toContain
(
'
file-modified
'
);
});
});
it
(
'
includes file-addition when a temp file
'
,
()
=>
{
it
(
'
includes file-addition when a temp file
'
,
()
=>
{
factory
();
vm
.
file
.
tempFile
=
true
;
vm
.
file
.
tempFile
=
true
;
expect
(
vm
.
changedIconClass
).
toContain
(
'
file-addition
'
);
expect
(
vm
.
changedIconClass
).
toContain
(
'
file-addition
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment