summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-08-30 14:27:33 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2017-09-05 12:18:33 +0200
commit936be35b766ae56f40e67b790d6e0e74339f2c91 (patch)
treebd509aeca7e07eeac75c6ce256137e69435edc20 /app/views
parent978252a3fa99414446ce887cd28bf2db5b223d44 (diff)
downloadgitlab-ce-936be35b766ae56f40e67b790d6e0e74339f2c91.tar.gz
update signature badges to reflect new states
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/commit/_other_user_signature_badge.html.haml12
-rw-r--r--app/views/projects/commit/_same_user_different_email_signature_badge.html.haml13
-rw-r--r--app/views/projects/commit/_signature.html.haml5
-rw-r--r--app/views/projects/commit/_unknown_key_signature_badge.html.haml1
-rw-r--r--app/views/projects/commit/_unverified_key_signature_badge.html.haml1
-rw-r--r--app/views/projects/commit/_unverified_signature_badge.html.haml (renamed from app/views/projects/commit/_invalid_signature_badge.html.haml)0
-rw-r--r--app/views/projects/commit/_verified_signature_badge.html.haml (renamed from app/views/projects/commit/_valid_signature_badge.html.haml)3
7 files changed, 30 insertions, 5 deletions
diff --git a/app/views/projects/commit/_other_user_signature_badge.html.haml b/app/views/projects/commit/_other_user_signature_badge.html.haml
new file mode 100644
index 00000000000..1f4e44d4b48
--- /dev/null
+++ b/app/views/projects/commit/_other_user_signature_badge.html.haml
@@ -0,0 +1,12 @@
+- title = capture do
+ .gpg-popover-icon.invalid
+ = render 'shared/icons/icon_status_notfound_borderless.svg'
+ %div
+ This commit was signed with a different user's verified signature.
+
+- content = capture do
+ = render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
+
+- locals = { signature: signature, title: title, content: content, label: 'Unverified', css_classes: ['invalid'] }
+
+= render partial: 'projects/commit/signature_badge', locals: locals
diff --git a/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml b/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml
new file mode 100644
index 00000000000..7cafc2967e9
--- /dev/null
+++ b/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml
@@ -0,0 +1,13 @@
+- title = capture do
+ .gpg-popover-icon.invalid
+ = render 'shared/icons/icon_status_notfound_borderless.svg'
+ %div
+ This commit was signed with a verified signature, but the committer email
+ is <strong>not verified</strong> to belong to the same user.
+
+- content = capture do
+ = render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
+
+- locals = { signature: signature, title: title, content: content, label: 'Unverified', css_classes: ['invalid'] }
+
+= render partial: 'projects/commit/signature_badge', locals: locals
diff --git a/app/views/projects/commit/_signature.html.haml b/app/views/projects/commit/_signature.html.haml
index 7598aa90b5b..145bc629380 100644
--- a/app/views/projects/commit/_signature.html.haml
+++ b/app/views/projects/commit/_signature.html.haml
@@ -1,5 +1,2 @@
- if signature
- - if signature.verified?
- = render partial: 'projects/commit/valid_signature_badge', locals: { signature: signature }
- - else
- = render partial: 'projects/commit/invalid_signature_badge', locals: { signature: signature }
+ = render partial: "projects/commit/#{signature.verification_status}_signature_badge", locals: { signature: signature }
diff --git a/app/views/projects/commit/_unknown_key_signature_badge.html.haml b/app/views/projects/commit/_unknown_key_signature_badge.html.haml
new file mode 100644
index 00000000000..75c5cf57bcc
--- /dev/null
+++ b/app/views/projects/commit/_unknown_key_signature_badge.html.haml
@@ -0,0 +1 @@
+= render partial: 'projects/commit/unverified_signature_badge', locals: { signature: signature }
diff --git a/app/views/projects/commit/_unverified_key_signature_badge.html.haml b/app/views/projects/commit/_unverified_key_signature_badge.html.haml
new file mode 100644
index 00000000000..75c5cf57bcc
--- /dev/null
+++ b/app/views/projects/commit/_unverified_key_signature_badge.html.haml
@@ -0,0 +1 @@
+= render partial: 'projects/commit/unverified_signature_badge', locals: { signature: signature }
diff --git a/app/views/projects/commit/_invalid_signature_badge.html.haml b/app/views/projects/commit/_unverified_signature_badge.html.haml
index 3a73aae9d95..3a73aae9d95 100644
--- a/app/views/projects/commit/_invalid_signature_badge.html.haml
+++ b/app/views/projects/commit/_unverified_signature_badge.html.haml
diff --git a/app/views/projects/commit/_valid_signature_badge.html.haml b/app/views/projects/commit/_verified_signature_badge.html.haml
index 62819c09b3f..d9fefcdfbb3 100644
--- a/app/views/projects/commit/_valid_signature_badge.html.haml
+++ b/app/views/projects/commit/_verified_signature_badge.html.haml
@@ -2,7 +2,8 @@
.gpg-popover-icon.valid
= render 'shared/icons/icon_status_success_borderless.svg'
%div
- This commit was signed with a <strong>verified</strong> signature.
+ This commit was signed with a <strong>verified</strong> signature and the
+ committer email is verified to belong to the same user.
- content = capture do
= render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }