Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save b4284/c60a0cd9c8a936c0b7e9606f053f28d7 to your computer and use it in GitHub Desktop.

Select an option

Save b4284/c60a0cd9c8a936c0b7e9606f053f28d7 to your computer and use it in GitHub Desktop.
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
// DO NOT EDIT THIS FILE, it will be overwritten on update
//
// Default rules for polkit
//
// See the polkit(8) man page for more information
// about configuring polkit.
polkit.addRule(function(action, subject) {
if (subject.user == "b4283"
&& action.id == "org.freedesktop.udisks2.encrypted-unlock-system")
{
var uuid = action.lookup("id.uuid");
if (uuid == "08a11f98-ed7c-46aa-9c78-98725f568a89"
|| uuid == "da43c847-2772-46e5-a48f-6b4cee7dc247")
{
return polkit.Result.YES;
}
}
});
polkit.addRule(function(action, subject) {
if (subject.user == "b4283"
&& (action.id == "org.freedesktop.udisks2.filesystem-mount"
|| action.id == "org.freedesktop.udisks2.filesystem-mount-system"))
{
var uuid = action.lookup("id.uuid");
if (uuid == "dd1c5c31-b97c-4b44-8d2b-daa944063dcf")
{
return polkit.Result.YES;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment