User assigned policy is removed during push
Describe the bug When a policy is assigned at the user level, running a push will remove the assignment. This was fixed in version 3.2.1 but seems to be happening again in version 3.2.3
To Reproduce Steps to reproduce the behavior:
Assign a policy to a user in Directus Run directus-sync push Open user account in Directus See policy is no longer assigned Expected behavior As users aren't included as part of the sync I would've expected it not to remove the policy assignment.
Versions:
Directus-Sync version: 3.2.3 Directus version: 11.3.5 Database: MSSQL Directus environment Docker/Self-hosted
@TomSteer I couldn't reproduce the issue. I will add more testing.
If you revert to previous version (npx [email protected] push), does it work ?
Hi @EdouardDem ,
Downgrading to 3.2.2 still results in the same issue. However, downgrading to 3.2.1 does fix the issue. I'm not sure what other effects this might have, as I recall you mentioned that 3.2.2 fixes a regression from the 3.2.1 fix.
If you need any more information then just let me know. Thanks again for looking into the issue!
Hi @EdouardDem, Any luck on narrowing this one down? Is there an edge we should be aware of if we downgrade to 3.2.1?
@EdouardDem I think I've narrowed the issue down. It only seems to happen for policies that aren't assigned to a role.
To Reproduce Steps to reproduce the behavior:
Create a policy in Directus that isn't assigned to a user or role. Run directus-sync pull Assign the policy to a user in Directus Run directus-sync push Open user account in Directus See policy is no longer assigned Expected behavior As users aren't included as part of the sync I would've expected it not to remove the policy assignment.
@TomSteer Thank you for pointing this solution.
I'm a bit busy these days. You could use version 3.2.1 until I fix the error.