summaryrefslogtreecommitdiff
diff options
authorRobert Ancell <robert.ancell@canonical.com>2023-08-11 14:08:29 +1200
committerMichael Vogt <michael.vogt@gmail.com>2023-08-15 17:58:53 +0200
commit2a2ad5e70bf62d3d0b0e50b95bbf989b5cf594e0 (patch)
tree9c41cebc55c1ad3f20965c2fa6bfef2e3ec84d37
parent22ec4fb04f9196371c1998c8b0580371bbbb0569 (diff)
i/b/desktop: allow desktop slots to provide notifications
This is used in core desktop as the shell needs to expose these interfaces.
-rw-r--r--interfaces/builtin/desktop.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/interfaces/builtin/desktop.go b/interfaces/builtin/desktop.go
index b0e7f4ecf1..e1913d8bca 100644
--- a/interfaces/builtin/desktop.go
+++ b/interfaces/builtin/desktop.go
@@ -310,6 +310,35 @@ dbus (send, receive)
peer=(label=unconfined),
`
+var desktopPermanentSlotAppArmor = `
+# Description: Can provide various desktop services
+
+#include <abstractions/dbus-session-strict>
+
+# Able to provide notifications
+dbus (receive)
+ bus=session
+ path=/org/freedesktop/Notifications
+ interface=org.freedesktop.Notifications
+ member="{GetCapabilities,GetServerInformation,Notify,CloseNotification}"
+ peer=(label=unconfined),
+
+dbus (send)
+ bus=session
+ path=/org/freedesktop/Notifications
+ interface=org.freedesktop.Notifications
+ member={ActionInvoked,NotificationClosed,NotificationReplied}
+ peer=(label=unconfined),
+
+# Able to provide GTK notifications
+dbus (receive)
+ bus=session
+ path=/org/gtk/Notifications
+ interface=org.gtk.Notifications
+ member="{AddNotification,RemoveNotification}"
+ peer=(label=unconfined),
+`
+
type desktopInterface struct {
commonInterface
}