15 lines
524 B
Plaintext
15 lines
524 B
Plaintext
|
/* make sure that users that are in an admin group always authenticate with
|
||
|
* their own password and don't get a choice. Users not in an admin group get
|
||
|
* the full choice and may also authenticate as root */
|
||
|
polkit._suse_admin_groups = [];
|
||
|
polkit.addAdminRule(function(action, subject) {
|
||
|
var rules = ["unix-user:0"];
|
||
|
for (var i in polkit._suse_admin_groups) {
|
||
|
var g = polkit._suse_admin_groups[i];
|
||
|
if (subject.isInGroup(g))
|
||
|
return ["unix-user:"+subject.user];
|
||
|
rules.push("unix-group:"+g);
|
||
|
}
|
||
|
return rules;
|
||
|
});
|