SSO and messages
* adds message for checking of intervention * refactors sso message sending to handle an iterable of users * adds specific method for sending object checking related messages * adds label support for modal form for more simple clicking of checkboxes
This commit is contained in:
@@ -19,6 +19,7 @@ from intervention.models import Intervention, Revocation
|
||||
from konova.forms import BaseForm, BaseModalForm
|
||||
from konova.models import Document
|
||||
from konova.settings import DEFAULT_LAT, DEFAULT_LON, DEFAULT_ZOOM, ZB_GROUP, ETS_GROUP
|
||||
from konova.utils.messenger import Messenger
|
||||
from konova.utils.user_checks import in_group
|
||||
from organisation.models import Organisation
|
||||
from user.models import UserActionLogEntry, UserAction
|
||||
@@ -429,6 +430,16 @@ class RunCheckForm(BaseModalForm):
|
||||
self.instance.log.add(user_action)
|
||||
self.instance.save()
|
||||
|
||||
# Send message to the SSO server
|
||||
messenger = Messenger(
|
||||
self.instance.users.all(),
|
||||
type="INFO",
|
||||
)
|
||||
messenger.send_object_checked(
|
||||
self.instance.identifier,
|
||||
self.user,
|
||||
)
|
||||
|
||||
|
||||
class NewWithdrawForm(BaseModalForm):
|
||||
""" Form for creating new withdraws
|
||||
|
||||
Reference in New Issue
Block a user