Add support for signing documents from the UI. Mayan EDMS is now in the major leagues :)

This commit is contained in:
Roberto Rosario
2016-03-30 03:47:58 -04:00
parent bc59613945
commit 09b71144b6
11 changed files with 190 additions and 23 deletions

View File

@@ -117,7 +117,7 @@ class Key(models.Model):
super(Key, self).save(*args, **kwargs)
def __str__(self):
return self.key_id
return '{} - {}'.format(self.key_id, self.user_id)
def sign_file(self, file_object, passphrase=None, clearsign=True, detached=False, binary=False, output=None):
temporary_directory = tempfile.mkdtemp()

View File

@@ -33,13 +33,7 @@ class KeyDeleteView(SingleObjectDeleteView):
return reverse_lazy('django_gpg:key_private_list')
def get_extra_context(self):
return {
'title': _('Delete key'),
'message': _(
'Delete key %s? If you delete a public key that is part of a '
'public/private pair the private key will be deleted as well.'
) % self.get_object(),
}
return {'title': _('Delete key: %s') % self.get_object()}
class KeyDetailView(SingleObjectDetailView):