mirror of https://github.com/jumpserver/jumpserver
parent
c981e9cd9f
commit
3d27986c96
|
@ -33,6 +33,7 @@ class ActionChoices(TextChoices):
|
||||||
reject = 'reject', _('Reject')
|
reject = 'reject', _('Reject')
|
||||||
accept = 'accept', _('Accept')
|
accept = 'accept', _('Accept')
|
||||||
review = 'review', _('Review')
|
review = 'review', _('Review')
|
||||||
|
notice = 'notice', _('Notifications')
|
||||||
|
|
||||||
|
|
||||||
class LoginTypeChoices(TextChoices):
|
class LoginTypeChoices(TextChoices):
|
||||||
|
|
|
@ -412,6 +412,9 @@ class ConnectionTokenViewSet(ExtraActionApiMixin, RootOrgViewMixin, JMSModelView
|
||||||
return ticket
|
return ticket
|
||||||
if acl.is_action(acl.ActionChoices.notice):
|
if acl.is_action(acl.ActionChoices.notice):
|
||||||
reviewers = acl.reviewers.all()
|
reviewers = acl.reviewers.all()
|
||||||
|
if not reviewers:
|
||||||
|
return
|
||||||
|
self._record_operate_log(acl, asset)
|
||||||
for reviewer in reviewers:
|
for reviewer in reviewers:
|
||||||
AssetLoginReminderMsg(reviewer, asset, user).publish_async()
|
AssetLoginReminderMsg(reviewer, asset, user).publish_async()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue