[epiphany/pgriffis/web-extension-gtask: 6/15] WebExtensions: Remove outdated permissions log




commit a30484a2ed09cc594c09ef988c6b3339b448c87d
Author: Patrick Griffis <pgriffis igalia com>
Date:   Tue May 24 14:33:11 2022 -0500

    WebExtensions: Remove outdated permissions log
    
    This is handled in each of the API handlers.
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1119>

 src/webextension/ephy-web-extension-manager.c | 7 -------
 1 file changed, 7 deletions(-)
---
diff --git a/src/webextension/ephy-web-extension-manager.c b/src/webextension/ephy-web-extension-manager.c
index 9e46657e3..d51473e07 100644
--- a/src/webextension/ephy-web-extension-manager.c
+++ b/src/webextension/ephy-web-extension-manager.c
@@ -456,7 +456,6 @@ ephy_web_extension_handle_script_message (WebKitUserContentManager *ucm,
   g_autoptr (JSCValue) name = NULL;
   g_autoptr (JSCValue) promise = NULL;
   g_auto (GStrv) split = NULL;
-  GPtrArray *permissions = ephy_web_extension_get_permissions (web_extension);
   unsigned int idx;
 
   if (!jsc_value_is_object (value))
@@ -485,12 +484,6 @@ ephy_web_extension_handle_script_message (WebKitUserContentManager *ucm,
   for (idx = 0; idx < G_N_ELEMENTS (api_handlers); idx++) {
     EphyWebExtensionApiHandler handler = api_handlers[idx];
 
-    if (!g_ptr_array_find (permissions, split[0], NULL)) {
-      LOG ("%s(): Requested api is not part of the permissions, aborting\n", __FUNCTION__);
-      /* TODO: Permissions are not working yet */
-      /*return; */
-    }
-
     if (g_strcmp0 (handler.name, split[0]) == 0) {
       g_autofree char *ret = NULL;
       g_autofree char *script = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]