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