Files
ucvl-zonghengjia-open-source/backend/control/migrations/0014_node_office_access_scope.py
2026-10-11 23:23:20 +00:00

27 lines
1.3 KiB
Python

from django.db import migrations, models
CHOICES = [
("company_network", "公司网络内的在职内部账号"),
("explicit_users", "保留原人工白名单"),
]
HELP = "公司网络模式不按员工所属办公室筛人。这里只生成网络验证候选,仍需通过登记站点的加密验证;公网IP、GPS、网关品牌都不能直接放行。"
class Migration(migrations.Migration):
dependencies = [("control", "0013_node_office_permissions")]
operations = [
# Preserve every existing node's old candidate boundary. New nodes use
# network scope; neither scope changes the legacy config exclusion.
migrations.AddField(
model_name="node", name="office_access_scope",
field=models.CharField(choices=CHOICES, default="explicit_users", db_default="explicit_users", max_length=24,
verbose_name="办公室候选范围", help_text=HELP),
),
migrations.AlterField(
model_name="node", name="office_access_scope",
field=models.CharField(choices=CHOICES, default="company_network", db_default="company_network", max_length=24,
verbose_name="办公室候选范围", help_text=HELP),
),
]