Commit Graph

21 Commits

Author SHA1 Message Date
Roberto Rosario
64e1c6bb67 Add widget support to SourceColumn
Allow passing a widget class to SourceColumn. This makes
using lambdas to render model column unnecesary and are
mostly removed too.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-22 05:35:31 -04:00
Roberto Rosario
8559565dca Signatures: No terminal raises NeedPassphrase
Update the Key model's sign_file method to raise the NeedPassphrase
exception when GPG has no terminal available and not just when the
GPG backend specifically asks for a passphrase.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-15 15:27:26 -04:00
Roberto Rosario
d6435b7735 Django GPG: 3rd party app compatibility update
Update the django_gpg app to work with the latest version of the
python-gnupg package (0.4.3).

The python-gnupg now returns a more clear error message to
differentiate between a bad passphrase and a missing passphrase.
This improments allows the django_gpg to simplify its error
message parsing and remove the literals:
"ERROR_MSG_NEED_PASSPHRASE" and "ERROR_MSG_GOOD_PASSPHRASE".

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 02:58:40 -04:00
Roberto Rosario
b04b205fb6 Add docstrings for almost all models
Also adds docstring to some managers and model methods.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2018-11-24 22:56:35 -04:00
Michael Price
53239385ae Add the "to=" keyword argument to all ForeignKey, ManayToMany and OneToOne Fields.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:49:04 -04:00
Michael Price
28aa0b913c Reorganize and sort models and managers according to Mayan's best practices.
Signed-off-by: Michael Price <loneviking72@gmail.com>
2018-04-01 20:21:37 -04:00
Roberto Rosario
f09321f6ab Fix deprecation warnings for Django 1.11 and Django 2.0.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-07-21 00:25:18 -04:00
Roberto Rosario
7a0c2224bb Add model docstrings.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2017-04-25 14:21:30 -04:00
Roberto Rosario
d3e6b21146 Encapsulate python-gnupg code into its own backend class. 2016-10-24 18:48:26 -04:00
Roberto Rosario
945158bd60 Normalize handling of temporary file and directory creation. 2016-06-23 20:54:10 -04:00
Roberto Rosario
c6fb008562 Workaround problem with gpg embedded signatures corrupting the source file by using clearsign=False by default. 2016-04-01 23:28:34 -04:00
Roberto Rosario
14988bab34 Add key upload view, permission, link and test. 2016-03-30 19:05:53 -04:00
Roberto Rosario
09b71144b6 Add support for signing documents from the UI. Mayan EDMS is now in the major leagues :) 2016-03-30 03:47:58 -04:00
Roberto Rosario
bc59613945 Add key content sign tests. 2016-03-30 02:32:08 -04:00
Roberto Rosario
4a4573fb1b Add missing gpg directory chmod. 2016-03-26 04:05:15 -04:00
Roberto Rosario
cd077cb076 Add more tests for the Key model. Remove the key_id field and made it a property derived from the fingerprint. 2016-03-23 11:58:08 -04:00
Roberto Rosario
2748d5959f Place KeyManage on a seprate module. Convert views to use the new Key model. Add KeyStub class and use it to return query results. Add Key detail link and view. Remove the setting for multiple keyservers. 2016-03-23 00:35:32 -04:00
Roberto Rosario
189cda437f Add model test. Finish file signing method. Add key signing exceptions. 2016-03-22 18:02:40 -04:00
Roberto Rosario
dc5d25fd00 Initial code for database stored GPG keys. 2016-03-22 05:10:54 -04:00
Roberto Rosario
26d64c45f5 Add the @python_2_unicode_compatible to all models. Closes issue #67 2015-04-01 02:40:19 -04:00
Roberto Rosario
ec1745b50b Initial changes to support the new Django 1.6 project structure 2014-06-15 13:13:21 +02:00