mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-22 16:31:33 +00:00
fix: 修改 job 审计日志
This commit is contained in:
@@ -7,6 +7,7 @@ from django.utils.translation import gettext, ugettext_lazy as _
|
||||
|
||||
from common.db.encoder import ModelJSONFieldEncoder
|
||||
from common.utils import lazyproperty
|
||||
from ops.models import JobExecution
|
||||
from orgs.mixins.models import OrgModelMixin, Organization
|
||||
from orgs.utils import current_org
|
||||
from .const import (
|
||||
@@ -24,9 +25,20 @@ __all__ = [
|
||||
"ActivityLog",
|
||||
"PasswordChangeLog",
|
||||
"UserLoginLog",
|
||||
"JobLog"
|
||||
]
|
||||
|
||||
|
||||
class JobLog(JobExecution):
|
||||
@property
|
||||
def creator_name(self):
|
||||
return self.creator.name
|
||||
|
||||
class Meta:
|
||||
proxy = True
|
||||
verbose_name = _("Job audit log")
|
||||
|
||||
|
||||
class FTPLog(OrgModelMixin):
|
||||
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
|
||||
user = models.CharField(max_length=128, verbose_name=_("User"))
|
||||
|
Reference in New Issue
Block a user