-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework SSH key management UI to add GPG #1293
Conversation
An early, and minimal, suggestion: change the key icon to a lock icon for the GPG/PGP portion. Really love, and appreciate the work you are doing to get this in! |
Awesome work! 👍 |
@Fastidious I was thinking of making it like github that use also a key for both but add a label under. But it would be better to just have a different icon like you propose. |
Other icon possibility : http://fontawesome.io/icon/key/, http://fontawesome.io/icon/pencil/ (for signing), http://fontawesome.io/icon/check-square-o/, http://fontawesome.io/icon/paperclip/ |
Hey, I just tested the gpg Validation and really like it! |
@Schizopriest It could be included in most part easily now with just passing commit list to ParseCommitsWithSignature like https://github.com/go-gitea/gitea/pull/1150/files#diff-da47b1b0b02ed3ac1a84db3edc178279R71 this will add information about validity of signature in template and use it like https://github.com/go-gitea/gitea/pull/1150/files#diff-7a50b55ffb3c01e4e467c74b23e0863bR44). I simply wanted to make it work simple at first and not change everywhere for base and not change a lot a pages. But now it could be done everywhere |
9c9a60e
to
b185d55
Compare
Woooh! Awesome 😄 Few conflicts though. Some notes:
|
I broke myself this PR with a other PR removing extra formatting in settings pages. ^^ I will put time on this one soon since it is the last part of sign commit with GPG key. |
629e2ba
to
2a3947e
Compare
This PR work now, I will look into optimization of verification since I found that hash class are consume and not re-usable so I fix it by regenerating hash before verifying against commiter keys but this is not really efficient way. I think, I will put it under a other PR since this only a overhead for signed commit and relative to the number of key of the signing user (and stop at first validation). |
52537e2
to
76ca188
Compare
@sapk great job! I will test this. |
if ($this.attr("id")) { | ||
filter += "#"+$this.attr("id") | ||
} | ||
$('.delete.modal'+filter).modal({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that nothing else on the site uses this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have check that all matching .delete-button don't have id so that this change don't interact with it. I will double check and confirm it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm !
@@ -0,0 +1,144 @@ | |||
{{template "base/head" .}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we break this file into 3? Having settings/keys.tmpl
, settings/keys_ssh.tmpl
and settings/keys_gpg.tmpl
? Would make it easier to copy-paste a file to possibly add more key-types in the future. Also makes the files smaller ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I will do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done !
500 when I add a GPG key with a non-exist email address. |
Thanks for the feedback. @lunny I added a error type to catch to be display. I think that when integration test are ready, this functionality will need some testing scenario. |
@sapk another consideration. After I added a gpg key, then I remove the email address. What will happen? |
Good question ^^ |
For validation of commit, those will failed because of 14fe901#diff-212b9fa4c927665ecbc5a5a36382ecedR385 For display of GPG keys this need to be checked. At first view, I think that there will still be display and not failed because we grab them by OwnerID. But I don't know how xorm will handle Emails fields leading to nothing. ca1c3f1#diff-212b9fa4c927665ecbc5a5a36382ecedR33 |
But anyhow I will give this LGTM. |
Yeah, appart from the conflict this is LGTM :D |
OK I will rebase |
- Fix duplicate entry in locale - Re-generate hash before verification since they are consumed
78cec74
to
8b63db4
Compare
Done, conflict was from #1290 because it move route from cmd to a package (for a good reason ^^). |
Complete GPG implementation #710 and #1150
TODO :