Commit Graph

7 Commits (8307c87b0dc04cd9ff44eb1e7424748bffc59914)

Author SHA1 Message Date
Shepilov Vladislav 8307c87b0d [12.0] web_notify: improve popup UI (#1231)
* [ADD]: all available bootstrap notifications (success/danger/warning/info/default)
* [IMP] use black color for text for default notification.
* [FIX] reverted require string for `bus.Longpolling` and rename `on_message_received` to `on_message` to prevent collisions.
2024-10-07 14:38:14 +07:00
Aitor Bouzas bdd4ca7cf0 [MIG] web_notify: Migration to 12.0
Add self-test buttons in demo environment,
Updated readme to show how to test it.
Add buttons to users form
Do not rely on SUPERUSER_ID and avoid getattr usage
2024-10-07 14:38:14 +07:00
Guewen Baconnier 2eb3dc7d92 Prevent to send web notifications to other users
Only the admin user (sudo) is allowed to send notifications to other
users. The normal users can only send notifications to themselves.

This is to prevent attackers to craft malicious notifications and send
them to other users using RPC.

Correction based on the idea of @hbrunn
2024-10-07 14:38:14 +07:00
Damien Bouvy 9810010400 [MIG] web_notify: Migration to 11.0
- Use the 'session' class of the JS Framework (session no lounger bound
to web client)
- Test change: compare emitted & received messages based on content, not
order. Using string comparison raises false positives.
2024-10-07 14:38:14 +07:00
Houzéfa Abbasbhay 1f9a18e30a [10.0][FIX] web_notify tests: Fix an arg check
Fix a check when comparing a user count with items within a mock call.

The previous method was succeeding by pure luck because OCA test
databases contain 2 users, which happens to be the amount of items
within a mock "call_args" (it contains args + kwargs).
2024-10-07 14:38:14 +07:00
Jay Vora(SerpentCS) 6d0762f188 [MIG] Migration started web_notify 2024-10-07 14:38:14 +07:00
Laurent Mignon (ACSONE) f8cf60d377 New module web_notify
This technical module allows you to send instant notification messages from the server to the user in live.
2024-10-07 14:38:14 +07:00