This repository was archived by the owner on Aug 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
backend/services/mgmt/v1alpha1/user-account-service
internal/ee/rbac/enforcer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,6 +238,8 @@ func (s *Service) ConvertPersonalToTeamAccount(
238238 return nil , err
239239 }
240240
241+ // todo: need to re-upsert rbac for the new personal account.
242+
241243 var checkoutSessionUrl * string
242244 if s .cfg .IsNeosyncCloud && ! resp .TeamAccount .StripeCustomerID .Valid && s .billingclient != nil {
243245 account , err := s .db .UpsertStripeCustomerId (
Original file line number Diff line number Diff line change 44 "context"
55 "database/sql"
66 "fmt"
7+ "time"
78
89 sqladapter "github.com/Blank-Xu/sql-adapter"
910 "github.com/casbin/casbin/v2"
@@ -36,7 +37,8 @@ func newEnforcer(
3637 if err != nil {
3738 return nil , fmt .Errorf ("unable to initialize casbin synced cached enforcer: %w" , err )
3839 }
39- enforcer .EnableAutoSave (true ) // seems to do this automatically but it doesn't hurt
40+ enforcer .EnableAutoSave (true ) // seems to do this automatically but it doesn't hurt
41+ enforcer .StartAutoLoadPolicy (time .Second * 10 ) // allows HA between neosync-api instances or backend changes to RBAC policies to be picked up.
4042 return enforcer , nil
4143}
4244
You can’t perform that action at this time.
0 commit comments