From 9f8f187d424a7d5690729d3ff80ba03849bf9fd9 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 14 Sep 2020 22:48:23 -0700 Subject: [PATCH] cockpit: Don't show home page icon to non-admin users Tests: - Logout and see that the home page icon is not visible. - Login as non-admin user and see that the home page icon is not visible. - Login as admin user and see that the home page icon is visible. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Joseph Nuthalapati --- plinth/modules/cockpit/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/modules/cockpit/__init__.py b/plinth/modules/cockpit/__init__.py index c1cf08767..d470c5aa1 100644 --- a/plinth/modules/cockpit/__init__.py +++ b/plinth/modules/cockpit/__init__.py @@ -77,7 +77,8 @@ class CockpitApp(app_module.App): short_description=info.short_description, icon=info.icon_filename, url='/_cockpit/', clients=info.clients, - login_required=True) + login_required=True, + allowed_groups=['admin']) self.add(shortcut) firewall = Firewall('firewall-cockpit', info.name,