inhibitShorcutsDialog: Fix permission check

Each permission entry is an array of strings, so checking that against
the expected string itself will always fail.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6107

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2548>
This commit is contained in:
Florian Müllner 2022-11-18 22:40:31 +01:00 committed by Marge Bot
parent 39263d3530
commit b0befbbfbb

View File

@ -143,7 +143,7 @@ var InhibitShortcutsDialog = GObject.registerClass({
if (permissions[appId] === undefined) // Not found
this._dialog.open();
else if (permissions[appId] === GRANTED)
else if (permissions[appId][0] === GRANTED)
this._emitResponse(DialogResponse.ALLOW);
else
this._emitResponse(DialogResponse.DENY);