mirror of https://github.com/jumpserver/jumpserver
perf: 修改工单创建授权规则的字段(created_by)
parent
7e7e24f51f
commit
aab59403e1
|
@ -100,7 +100,8 @@ class CreatePermissionMixin:
|
|||
# create permission
|
||||
def create_permission(self):
|
||||
create_method = getattr(self, f'create_{self.type}_permission', lambda: None)
|
||||
create_method()
|
||||
permission = create_method()
|
||||
return permission
|
||||
|
||||
|
||||
class CreateCommentMixin:
|
||||
|
|
|
@ -120,7 +120,7 @@ class CreatePermissionMixin:
|
|||
'category': apply_category,
|
||||
'type': apply_type,
|
||||
'comment': permission_comment,
|
||||
'created_by': self.processor_display,
|
||||
'created_by': '{}:{}'.format(str(self.__class__.__name__), str(self.id)),
|
||||
'date_start': approve_date_start,
|
||||
'date_expired': approve_date_expired,
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ class CreatePermissionMixin:
|
|||
'id': self.id,
|
||||
'name': permission_name,
|
||||
'comment': permission_comment,
|
||||
'created_by': self.processor_display,
|
||||
'created_by': '{}:{}'.format(str(self.__class__.__name__), str(self.id)),
|
||||
'actions': approve_actions,
|
||||
'date_start': approve_date_start,
|
||||
'date_expired': approve_date_expired,
|
||||
|
|
Loading…
Reference in New Issue