diff --git a/apps/common/api.py b/apps/common/api.py index eb108e94e..e93844988 100644 --- a/apps/common/api.py +++ b/apps/common/api.py @@ -9,7 +9,7 @@ from django.core.mail import get_connection, send_mail from django.utils.translation import ugettext_lazy as _ from django.conf import settings -from .permissions import IsSuperUser +from .permissions import IsSuperUser, IsAppUser from .serializers import MailTestSerializer, LDAPTestSerializer @@ -102,4 +102,3 @@ class DjangoSettingsAPI(APIView): if i.isupper(): configs[i] = str(getattr(settings, i)) return Response(configs) - diff --git a/apps/common/forms.py b/apps/common/forms.py index 882a7ab7a..0d0f057cf 100644 --- a/apps/common/forms.py +++ b/apps/common/forms.py @@ -127,7 +127,8 @@ class LDAPSettingForm(BaseForm): "name": "sn", "email": "mail" }), - help_text=_("User attr map present how to map LDAP user attr to jumpserver, username,name,email is jumpserver attr") + help_text=_( + "User attr map present how to map LDAP user attr to jumpserver, username,name,email is jumpserver attr") ) # AUTH_LDAP_GROUP_SEARCH_OU = CONFIG.AUTH_LDAP_GROUP_SEARCH_OU # AUTH_LDAP_GROUP_SEARCH_FILTER = CONFIG.AUTH_LDAP_GROUP_SEARCH_FILTER @@ -160,3 +161,10 @@ class TerminalSettingForm(BaseForm): "You can set other storage and some terminal using" ) ) + TERMINAL_REPLAY_STORAGE = DictField( + label=_("Replay storage"), help_text=_( + "Set replay storage setting, `default` is the using as default," + "You can set other storage and some terminal using" + ) + ) + diff --git a/apps/common/templates/common/terminal_setting.html b/apps/common/templates/common/terminal_setting.html index c15ff4bc7..881dd6343 100644 --- a/apps/common/templates/common/terminal_setting.html +++ b/apps/common/templates/common/terminal_setting.html @@ -12,27 +12,31 @@