mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
346 B
18 lines
346 B
from werkzeug.local import Local
|
|
|
|
from django.utils import translation
|
|
|
|
|
|
thread_local = Local()
|
|
encrypted_field_set = {'password', 'secret'}
|
|
|
|
|
|
def _find(attr):
|
|
return getattr(thread_local, attr, None)
|
|
|
|
|
|
def add_encrypted_field_set(label):
|
|
if label:
|
|
with translation.override('en'):
|
|
encrypted_field_set.add(str(label))
|