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.
jumpserver/apps/assets/const/web.py

47 lines
1.1 KiB

2 years ago
from django.utils.translation import gettext_lazy as _
2 years ago
from .base import BaseType
class WebTypes(BaseType):
WEBSITE = 'website', _('Website')
2 years ago
@classmethod
def _get_base_constrains(cls) -> dict:
return {
'*': {
'charset_enabled': False,
2 years ago
'domain_enabled': False,
'su_enabled': False,
}
}
@classmethod
def _get_automation_constrains(cls) -> dict:
constrains = {
'*': {
'gather_facts_enabled': False,
'verify_account_enabled': False,
'change_password_enabled': False,
'create_account_enabled': False,
'gather_accounts_enabled': False,
}
}
return constrains
@classmethod
def _get_protocol_constrains(cls) -> dict:
return {
2 years ago
'*': {
'choices': ['http'],
2 years ago
}
}
@classmethod
def internal_platforms(cls):
return {
cls.WEBSITE: [
{'name': 'Website'},
],
}