pluginpal/strapi-plugin-config-sync

Config changes for admin-role.strapi-super-admin cant be overwritten

Closed this issue · 4 comments

Bug report

Describe the bug

Hello! I've been using this plugin for a while and it's great! I ran so far only into one issue with 'Config changes for admin-role.strapi-super-admin'. I have settings in my database that can't be overwritten even with --force.

Screenshot 2023-08-22 at 14 57 14

Do you have any suggestion what to do about it?

System

  • Node.js version: v18 LTS
  • NPM version:
  • Strapi version: "@strapi/strapi": "4.11.1",
  • Plugin version: "strapi-plugin-config-sync": "^1.1.2",
  • Database: postgres
  • Operating system: MacOS/Linux

Hi @bart-iimpcoll,

It seems like your Strapi instance has multiple admin permissions with the same action key. That is a case this plugin does not handle, as these duplicate permissions are essentially useless. Just one of each will suffice.

I guess my question would be, how did you get here? I don't see how the plugin could've accidentally created those duplicate permissions.

Thank you for your answer. That is a great question. I honestly don't know. I checked my git history and it seems I deleted the file and then in the next commit it appeared with duplicates.

Is there any way of hard resetting this?

You could truncate your admin permissions table and afterwards run a config import. I think that will resolve this issue for you.

Make sure to backup the table before you truncate so you can restore if needed.

Thank you for your help. I tried different approaches and in the end manually removed the duplicated rows from DB and then resynced all and now it works