Group visibilityPermissions empty after import
-
I’m on jsreport
4.9.0and running multiple instances. For deployments, I use the export/import workflow (jsexport → import into new instance).The issue occurs specifically with groups:
When a group already exists in the target environment, everything works fine — imported entities correctly inherit permissions and the entity's
visibilityPermissionsincludes the group's ID.When a group is newly created by the import, the entities the have the group permission end up with an empty
visibilityPermissionsarray. As a result, users in that group cannot see the entities they should.Workarounds:
If I remove, save then re-add a permission on the group and save it again,
then visibilityPermissions is correctly populated and everything works.I’ve tried both with and without the
--fullImportflag — no difference.It looks like the importer isn’t populating
visibilityPermissionsfor newly created groups.Could you confirm if this is a bug in the import/export flow, or if I’m missing a required step?
-
Thank you.
I confirm this is a bug. I apologize for the inconvenience.We make sure this is fixed in the next update. Not having the date, though.
Here is the gh ticket to track
https://github.com/jsreport/jsreport/issues/1257
-
That’s a strange one. I’ve seen similar issues with imports before where the core data moves over fine, but the metadata or link tables for permissions don’t seem to 'hook' correctly in the new environment.
Have you checked if the Group IDs in your export file actually match the IDs in the new instance? Sometimes if the groups aren't created in the exact same order or if they have different internal IDs, the permissions end up pointing to nothing. It might also be worth doing a quick check of the logs during the import to see if there are any 'foreign key' or 'unauthorized' errors popping up silently.