From 854f82a211397055c268349b7db67049f7c0648d Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 28 Aug 2024 17:25:04 -0700 Subject: [PATCH] privacy: Show notification again so that users see the new setting Tests: - Without the patch, start the service and dismiss the privacy notification. With the patch, the restart the service. Privacy app is updated and privacy notification is shown again. Incrementing the version number of the privacy app does not result in showing of the notification again. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Veiko Aasa --- plinth/modules/privacy/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plinth/modules/privacy/__init__.py b/plinth/modules/privacy/__init__.py index 89343f93a..dae267988 100644 --- a/plinth/modules/privacy/__init__.py +++ b/plinth/modules/privacy/__init__.py @@ -20,7 +20,7 @@ class PrivacyApp(app_module.App): app_id = 'privacy' - _version = 2 + _version = 3 can_be_disabled = False @@ -58,6 +58,8 @@ class PrivacyApp(app_module.App): privileged.setup() if old_version == 0: privileged.set_configuration(enable_popcon=True) + + if old_version < 3: _show_privacy_notification() @@ -82,4 +84,4 @@ def _show_privacy_notification(): Notification.update_or_create(id='privacy-review', app_id='privacy', severity='info', title=title, message=message, actions=actions_, data=data, - group='admin') + group='admin', dismissed=False)