Hey all - I have a maybe werid question but am running into an issue and am having a hard time figuring out what is going on.
I can paste some code to show folks but from a high level what I am observing is as follows:
I have a 3 "slot" policy - where v0 is a uuid, v1 is a "context" and v2 is an action "read / write / delete" etc
During my registration flow - the policy gets updated twice. ( I call AddPolicies() and SavePolicy() each time )
Once when the user initially creates an oauth2 session - and then again when they make a selection about an org to join.
The issue I am running into is the following:
Often during registration something funky happens and a policy gets saved with 4 fields rather than 3 - this causes casbin to blow up as it doesnt know what to do with a 4 field policy with my configuration. This then currupts the internal cache casbin seems to keep.
A very hacky fix - is to remove the policies in my Postgres DB that have the extra fields - then restart the server.
I am trying to debug my code and figure out whats going on - but wanted to describe the symptoms of the issue I am experienceing to see if it sounds familiar to anyone.
