Skip to content

Conversation

@satti-hari-krishna-reddy
Copy link
Collaborator

Added fixUsersForOrg function to ensure users in org.Users are also in user.Orgs

Copy link
Member

@0x0elliot 0x0elliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make it so that it only happens in special circumstances? I sort of don't want it to get triggered every time.

Copy link
Member

@0x0elliot 0x0elliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if updateOrg {

you see how there was an updateOrg bool? Make it false by default (https://stackoverflow.com/a/23650312/12674948 look at option 2 here for this), and find a mechanism where it makes sense to trigger it. I don't want recursive/unnecessary triggers.

Where do you think triggering it makes sense the most?

@satti-hari-krishna-reddy satti-hari-krishna-reddy changed the title sync org users with user orgs bidirectionally sync org users with user orgs Nov 24, 2025
@frikky
Copy link
Member

frikky commented Nov 26, 2025

What is this even for?

I agree with @0x0elliot that realtime triggering is an awful way to go

Also: Remember that doing this MOVES the trusted controller from Org.Users to Users.Orgs as well. This means BOTH are sources of truth, not just one. That is a bold move and could have reprecussions in other areas.

@satti-hari-krishna-reddy satti-hari-krishna-reddy marked this pull request as draft November 26, 2025 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants