diff --git a/plinth/frontpage.py b/plinth/frontpage.py index 29fc06fa1..d50a8a782 100644 --- a/plinth/frontpage.py +++ b/plinth/frontpage.py @@ -68,10 +68,7 @@ def remove_shortcut(shortcut_id): if not match(shortcut)} -def hide_shortcut(shortcut_id): - """ - Makes the shortcut hidden - """ +def hide_shortcut(shortcut_id, hide=True): + """Mark a shortcut as hidden or not hidden.""" global shortcuts - if shortcut_id in shortcuts.keys(): - shortcuts[shortcut_id]['hidden'] = True + shortcuts[shortcut_id]['hidden'] = hide diff --git a/plinth/templates/index.html b/plinth/templates/index.html index 66b3cda2c..2ccb01321 100644 --- a/plinth/templates/index.html +++ b/plinth/templates/index.html @@ -27,25 +27,27 @@ {% if shortcuts %} {% for shortcut in shortcuts %} - {% if shortcut.hidden is False and user.is_authenticated or shortcut.login_required is False %} -