w3bdesign / wp-algolia-woo-indexer

✏️ WordPress plugin that sends WooCommerce products to Algolia. Used with headless eCommerce.
GNU General Public License v3.0
34 stars 13 forks source link

Admin API Key should not be used when Write API Key is enough #194

Open epnb opened 6 months ago

epnb commented 6 months ago

Hello, I'm wondering why an Admin API Key is required while the Write API Key is enough to create and update an index. At least we should be able to use a Write API Key if enough for our specific use case.

This requires to lower the access rights required in Algolia_Send_Products::can_connect_to_algolia() Instead of using self::$algolia->listApiKeys(); we could use self::$algolia->listIndices();

Thank your for your comments.

w3bdesign commented 6 months ago

Hello, I'm wondering why an Admin API Key is required while the Write API Key is enough to create and update an index. At least we should be able to use a Write API Key if enough for our specific use case.

This requires to lower the access rights required in Algolia_Send_Products::can_connect_to_algolia() Instead of using self::$algolia->listApiKeys(); we could use self::$algolia->listIndices();

Thank your for your comments.

Hi,

You might be right. I haven't done any active work on this plugin for a few years, but I will take a look when I have time.