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
5088e316
Commit
5088e316
authored
Aug 15, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace inline scripts in links to prevent default
Use buttons instead of links with javascript:void(0)
parent
0a33c2fb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
13 deletions
+15
-13
app/assets/javascripts/members.js
app/assets/javascripts/members.js
+2
-0
app/views/projects/commit/_ajax_signature.html.haml
app/views/projects/commit/_ajax_signature.html.haml
+1
-1
app/views/projects/commit/_signature_badge.html.haml
app/views/projects/commit/_signature_badge.html.haml
+1
-1
app/views/shared/members/_group.html.haml
app/views/shared/members/_group.html.haml
+1
-1
app/views/shared/members/_member.html.haml
app/views/shared/members/_member.html.haml
+1
-1
spec/features/signed_commits_spec.rb
spec/features/signed_commits_spec.rb
+9
-9
No files found.
app/assets/javascripts/members.js
View file @
5088e316
...
...
@@ -17,6 +17,8 @@ export default class Members {
}
dropdownClicked
(
options
)
{
options
.
e
.
preventDefault
();
this
.
formSubmit
(
null
,
options
.
$el
);
}
...
...
app/views/projects/commit/_ajax_signature.html.haml
View file @
5088e316
-
if
commit
.
has_signature?
%
a
{
href:
'javascript:void(0)'
,
tabindex:
0
,
class:
commit_signature_badge_classes
(
'js-loading-gpg-badge'
),
data:
{
toggle:
'tooltip'
,
placement:
'top'
,
title:
_
(
'GPG signature (loading...)'
),
'commit-sha'
=>
commit
.
sha
}
}
%
button
{
tabindex:
0
,
class:
commit_signature_badge_classes
(
'js-loading-gpg-badge'
),
data:
{
toggle:
'tooltip'
,
placement:
'top'
,
title:
_
(
'GPG signature (loading...)'
),
'commit-sha'
=>
commit
.
sha
}
}
app/views/projects/commit/_signature_badge.html.haml
View file @
5088e316
...
...
@@ -24,5 +24,5 @@
=
link_to
(
_
(
'Learn more about signing commits'
),
help_page_path
(
'user/project/repository/gpg_signed_commits/index.md'
),
class:
'gpg-popover-help-link'
)
%
a
{
href:
'javascript:void(0)'
,
tabindex:
0
,
class:
css_classes
,
data:
{
toggle:
'popover'
,
html:
'true'
,
placement:
'top'
,
title:
title
,
content:
content
}
}
%
button
{
tabindex:
0
,
class:
css_classes
,
data:
{
toggle:
'popover'
,
html:
'true'
,
placement:
'top'
,
title:
title
,
content:
content
}
}
=
label
app/views/shared/members/_group.html.haml
View file @
5088e316
...
...
@@ -32,7 +32,7 @@
%ul
-
Gitlab
::
Access
.
options
.
each
do
|
role
,
role_id
|
%li
=
link_to
role
,
"javascript:void(0)"
,
=
link_to
role
,
'#'
,
class:
(
"is-active"
if
group_link
.
group_access
==
role_id
),
data:
{
id:
role_id
,
el_id:
dom_id
}
.clearable-input.member-form-control.d-sm-inline-block
...
...
app/views/shared/members/_member.html.haml
View file @
5088e316
...
...
@@ -82,7 +82,7 @@
%ul
-
member
.
valid_level_roles
.
each
do
|
role
,
role_id
|
%li
=
link_to
role
,
"javascript:void(0)"
,
=
link_to
role
,
'#'
,
class:
(
"is-active"
if
member
.
access_level
==
role_id
),
data:
{
id:
role_id
,
el_id:
dom_id
(
member
)
}
=
render_if_exists
'shared/members/ee/revert_ldap_group_sync_option'
,
...
...
spec/features/signed_commits_spec.rb
View file @
5088e316
...
...
@@ -15,8 +15,8 @@ describe 'GPG signed commits' do
visit
project_commit_path
(
project
,
ref
)
expect
(
page
).
to
have_
link
'Unverified'
expect
(
page
).
not_to
have_
link
'Verified'
expect
(
page
).
to
have_
button
'Unverified'
expect
(
page
).
not_to
have_
button
'Verified'
# user changes his email which makes the gpg key verified
perform_enqueued_jobs
do
...
...
@@ -26,8 +26,8 @@ describe 'GPG signed commits' do
visit
project_commit_path
(
project
,
ref
)
expect
(
page
).
not_to
have_
link
'Unverified'
expect
(
page
).
to
have_
link
'Verified'
expect
(
page
).
not_to
have_
button
'Unverified'
expect
(
page
).
to
have_
button
'Verified'
end
it
'changes from unverified to verified when the user adds the missing gpg key'
do
...
...
@@ -36,8 +36,8 @@ describe 'GPG signed commits' do
visit
project_commit_path
(
project
,
ref
)
expect
(
page
).
to
have_
link
'Unverified'
expect
(
page
).
not_to
have_
link
'Verified'
expect
(
page
).
to
have_
button
'Unverified'
expect
(
page
).
not_to
have_
button
'Verified'
# user adds the gpg key which makes the signature valid
perform_enqueued_jobs
do
...
...
@@ -46,8 +46,8 @@ describe 'GPG signed commits' do
visit
project_commit_path
(
project
,
ref
)
expect
(
page
).
not_to
have_
link
'Unverified'
expect
(
page
).
to
have_
link
'Verified'
expect
(
page
).
not_to
have_
button
'Unverified'
expect
(
page
).
to
have_
button
'Verified'
end
context
'shows popover badges'
,
:js
do
...
...
@@ -136,7 +136,7 @@ describe 'GPG signed commits' do
visit
project_commit_path
(
project
,
GpgHelpers
::
SIGNED_AND_AUTHORED_SHA
)
# wait for the signature to get generated
expect
(
page
).
to
have_
link
'Verified'
expect
(
page
).
to
have_
button
'Verified'
user_1
.
destroy!
...
...
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