For Ubuntu 18.04 Gnome desktop, system and app notifications are shown also in the lock screen.
For some who want to hide these notifications on the lock screen, this quick tutorial will show you how.
1. First, open Ubuntu Software, search for and install dconf editor.
2. Once installed, launch dconf editor from application menu.
3. When it opens, navigate to org/gnome/desktop/notifications, and turn OFF the switch for “show-in-lock-screen”
That’s it. Enjoy!