mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
security: Drop use of managed_services in security report
Use Daemon component instead. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
84ae338e66
commit
9ec0c5f3db
@ -12,6 +12,7 @@ from django.utils.translation import gettext_lazy as _
|
|||||||
from plinth import actions
|
from plinth import actions
|
||||||
from plinth import app as app_module
|
from plinth import app as app_module
|
||||||
from plinth import menu, module_loader
|
from plinth import menu, module_loader
|
||||||
|
from plinth.daemon import Daemon
|
||||||
from plinth.modules.backups.components import BackupRestore
|
from plinth.modules.backups.components import BackupRestore
|
||||||
from plinth.package import Packages
|
from plinth.package import Packages
|
||||||
|
|
||||||
@ -137,10 +138,10 @@ def get_apps_report():
|
|||||||
if not packages:
|
if not packages:
|
||||||
continue # app has no managed packages
|
continue # app has no managed packages
|
||||||
|
|
||||||
try:
|
components = module.app.get_components_of_type(Daemon)
|
||||||
services = module.managed_services
|
services = []
|
||||||
except AttributeError:
|
for component in components:
|
||||||
services = None
|
services.append(component.unit)
|
||||||
|
|
||||||
# filter out apps not setup yet
|
# filter out apps not setup yet
|
||||||
if module.setup_helper.get_state() == 'needs-setup':
|
if module.setup_helper.get_state() == 'needs-setup':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user