diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:09:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:09:04 +0000 |
commit | 829aea9a4dce048f63c6d9568b50ab4bdb7609e3 (patch) | |
tree | 7c5d5ac80e81dc5186f19649f48387a67df20425 /data/20-gnome-initial-setup.rules | |
parent | Initial commit. (diff) | |
download | gnome-initial-setup-829aea9a4dce048f63c6d9568b50ab4bdb7609e3.tar.xz gnome-initial-setup-829aea9a4dce048f63c6d9568b50ab4bdb7609e3.zip |
Adding upstream version 3.38.4.upstream/3.38.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'data/20-gnome-initial-setup.rules')
-rw-r--r-- | data/20-gnome-initial-setup.rules | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/data/20-gnome-initial-setup.rules b/data/20-gnome-initial-setup.rules new file mode 100644 index 0000000..33d7e30 --- /dev/null +++ b/data/20-gnome-initial-setup.rules @@ -0,0 +1,28 @@ +// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- +// +// DO NOT EDIT THIS FILE, it will be overwritten on update. +// +// Allow the gnome-initial-setup user to do certain actions without +// being interrupted by password dialogs + +polkit.addRule(function(action, subject) { + if (subject.user !== 'gnome-initial-setup') + return undefined; + + var actionMatches = (action.id.indexOf('org.freedesktop.hostname1.') === 0 || + action.id.indexOf('org.freedesktop.NetworkManager.') === 0 || + action.id.indexOf('org.freedesktop.locale1.') === 0 || + action.id.indexOf('org.freedesktop.accounts.') === 0 || + action.id.indexOf('org.freedesktop.timedate1.') === 0 || + action.id.indexOf('org.freedesktop.realmd.') === 0 || + action.id.indexOf('com.endlessm.ParentalControls.') === 0); + + if (actionMatches) { + if (subject.local) + return 'yes'; + else + return 'auth_admin'; + } + + return undefined; +}); |