mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-22 16:31:33 +00:00
feat: 资产登录工单页面增加监控与中断
This commit is contained in:
@@ -11,6 +11,9 @@ import jms_storage
|
||||
from common.utils import get_logger
|
||||
from . import const
|
||||
from .models import ReplayStorage
|
||||
from tickets.models import TicketSession, TicketStep, TicketAssignee
|
||||
from tickets.const import ProcessStatus
|
||||
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
@@ -247,3 +250,11 @@ class ComponentsPrometheusMetricsUtil(TypedComponentsStatusMetricsUtil):
|
||||
prometheus_metrics.append('\n')
|
||||
prometheus_metrics_text = '\n'.join(prometheus_metrics)
|
||||
return prometheus_metrics_text
|
||||
|
||||
|
||||
def is_session_approver(session_id, user_id):
|
||||
ticket = TicketSession.get_ticket_by_session_id(session_id)
|
||||
if not ticket:
|
||||
return False
|
||||
ok = ticket.has_all_assignee(user_id)
|
||||
return ok
|
||||
|
Reference in New Issue
Block a user