-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hamonikr.desktop.rules
144 lines (129 loc) · 4.6 KB
/
hamonikr.desktop.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// Allow gparted for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.gnome.gparted" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow user and group management for desktop users
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.accounts.user-administration" ||
action.id == "org.cinnamon.settings-users") &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow lightdm settings for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.x.lightdm-settings" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow gufw for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "com.ubuntu.pkexec.gufw" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow mintsources for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "com.linuxmint.mintsources" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow boot-select for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.hamonikr.pkexec.boot-select" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow file operations for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.gtk.vfs.file-operations" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow nemo root for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.nemo.root" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow timeshift for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "in.teejeetech.pkexec.timeshift-gtk" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow apt install file for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.debian.apt.install-file" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow apt install or remove packages for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.debian.apt.install-or-remove-packages" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow apt install packages from new repo for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.debian.apt.install-packages-from-new-repo" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow apt install packages from high trust repo for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.debian.apt.install-packages.high-trust-repo" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow apt install purchased packages for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.debian.apt.install-purchased-packages" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow synaptic for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "com.ubuntu.pkexec.synaptic" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
// Allow policykit exec for desktop users
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.policykit.exec" &&
subject.active == true && subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});