summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDesktop/AppFile.cpp
diff options
context:
space:
mode:
authorne0ndrag0n <ne0ndrag0n@users.noreply.github.com>2022-10-03 20:08:34 -0400
committerLinus Groh <mail@linusgroh.de>2022-10-14 11:23:06 +0200
commit7fc22896ee0f417a618143c83967019d2eba5761 (patch)
tree11e60c1d55b1099c51506922a2d9908e51972b1e /Userland/Libraries/LibDesktop/AppFile.cpp
parentb4456ecdbbe6aa9e0187c06458acc51e50ced512 (diff)
downloadserenity-7fc22896ee0f417a618143c83967019d2eba5761.zip
LibDesktop: Add support for RequiresRoot option to AppFile
Diffstat (limited to 'Userland/Libraries/LibDesktop/AppFile.cpp')
-rw-r--r--Userland/Libraries/LibDesktop/AppFile.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibDesktop/AppFile.cpp b/Userland/Libraries/LibDesktop/AppFile.cpp
index 1ef20f3986..d37a3c4a8e 100644
--- a/Userland/Libraries/LibDesktop/AppFile.cpp
+++ b/Userland/Libraries/LibDesktop/AppFile.cpp
@@ -102,6 +102,11 @@ bool AppFile::run_in_terminal() const
return m_config->read_bool_entry("App", "RunInTerminal", false);
}
+bool AppFile::requires_root() const
+{
+ return m_config->read_bool_entry("App", "RequiresRoot", false);
+}
+
Vector<String> AppFile::launcher_mime_types() const
{
Vector<String> mime_types;