Add wheel group in polkit rules

This commit is contained in:
Lakindu Akash 2021-10-19 03:39:32 +05:30
parent 2bd4d5906b
commit ed7002dcae
No known key found for this signature in database
GPG Key ID: 6FB0085A614E0AC2
2 changed files with 3 additions and 3 deletions

View File

@ -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>

View File

@ -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;