mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-21 19:40:11 +00:00
Merge pull request #205 from lakinduakash/dev
Add wheel group in polkit rules
This commit is contained in:
commit
bcdd832ecf
@ -19,7 +19,7 @@
|
|||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action id="org.opensuse.policykit.create-ap">
|
<action id="org.opensuse.policykit.create-ap">
|
||||||
<message>Authentication is required to run the Wihotspot</message>
|
<message>Authentication is required to run the create_ap</message>
|
||||||
<icon_name>wihotspot</icon_name>
|
<icon_name>wihotspot</icon_name>
|
||||||
<defaults>
|
<defaults>
|
||||||
<allow_any>auth_admin</allow_any>
|
<allow_any>auth_admin</allow_any>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/* Allow users in admin group to run GParted without authentication */
|
/* Allow users in admin group to run create_ap without authentication */
|
||||||
polkit.addRule(function(action, subject) {
|
polkit.addRule(function(action, subject) {
|
||||||
if ( action.id == "org.opensuse.policykit.create-ap" ) {
|
if ( action.id == "org.opensuse.policykit.create-ap" ) {
|
||||||
|
|
||||||
if (subject.isInGroup("sudo")) {
|
if (subject.isInGroup("sudo") || subject.isInGroup("wheel")) {
|
||||||
return polkit.Result.YES;
|
return polkit.Result.YES;
|
||||||
} else {
|
} else {
|
||||||
return polkit.Result.AUTH_ADMIN;
|
return polkit.Result.AUTH_ADMIN;
|
||||||
|
Loading…
Reference in New Issue
Block a user