feat: Set the default expiration days for adding user and asset permissions

This commit is contained in:
ewall555
2025-05-12 11:41:58 +08:00
committed by 老广
parent bd0c50a3e4
commit a88ebeff15
6 changed files with 25 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ from rest_framework.exceptions import PermissionDenied
from common.db import fields, models as jms_models
from common.utils import (
date_expired_default, get_logger, lazyproperty
user_date_expired_default, get_logger, lazyproperty
)
from labels.mixins import LabeledMixin
from orgs.utils import current_org
@@ -99,7 +99,7 @@ class User(
comment = models.TextField(blank=True, null=True, verbose_name=_("Comment"))
is_first_login = models.BooleanField(default=True, verbose_name=_("Is first login"))
date_expired = models.DateTimeField(
default=date_expired_default,
default=user_date_expired_default,
blank=True,
null=True,
db_index=True,