mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
perf: 修改工单创建授权规则的字段(created_by)
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user