Files
mayan-edms/mayan/apps/django_gpg/settings.py
Roberto Rosario 8d8ec59e03 Django GPG: Setting options changes
Remove the SIGNATURES_GPG_HOME settings. The GPG keys are no longer
stored in disk but in the database itself making this setting obsolete.
This changed happened several versions ago and this removal doesn't affect
any code path.

Add two new settings to the app: SIGNATURES_GPG_BACKEND and
SIGNATURES_GPG_BACKEND_ARGUMENTS. These settings allow changing the
GPG backend that the app will use.

Remove the settings SIGNATURES_GPG_PATH. The path to the GPG binary
is now passed via the SIGNATURES_GPG_BACKEND_ARGUMENTS.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
2018-12-06 02:34:15 -04:00

32 lines
952 B
Python

from __future__ import unicode_literals
import os
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from mayan.apps.smart_settings import Namespace
from .literals import DEFAULT_GPG_PATH, DEFAULT_SETTING_GPG_BACKEND
namespace = Namespace(name='django_gpg', label=_('Signatures'))
setting_gpg_backend = namespace.add_setting(
default=DEFAULT_SETTING_GPG_BACKEND,
global_name='SIGNATURES_GPG_BACKEND', help_text=_(
'Path to the GPG class to use when managing keys.'
)
)
setting_gpg_backend_arguments = namespace.add_setting(
global_name='SIGNATURES_GPG_BACKEND_ARGUMENTS',
default={
'gpg_path': DEFAULT_GPG_PATH
}, help_text=_(
'Arguments to pass to the SIGNATURES_GPG_BACKEND. '
)
)
setting_keyserver = namespace.add_setting(
global_name='SIGNATURES_KEYSERVER', default='pool.sks-keyservers.net',
help_text=_('Keyserver used to query for keys.')
)