Skip to content

Organizations#397

Merged
supun-io merged 26 commits intomainfrom
org
Feb 14, 2026
Merged

Organizations#397
supun-io merged 26 commits intomainfrom
org

Conversation

@sakithb
Copy link
Copy Markdown
Contributor

@sakithb sakithb commented Feb 2, 2026

  • add organization column and DEPLOYMENT env var
  • add CloudContext

@sakithb
Copy link
Copy Markdown
Contributor Author

sakithb commented Feb 3, 2026

How to migrate:

  • Find all the tables that have hyvor_user_id and add a new nullable int organization_id column to it
  • env changes
    • Add DEPLOYMENT env variable.
    • Remove AUTH_METHOD
    • Change HYVOR_PRIVATE_INSTANCE to http://hyvor.internal
  • CloudContext must be used. Org switch must be handled
  • Resource creation must be updated to use ResourceCreator HDS component
  • AuthInterface now have me() instead of check(). It returns user and organization both in an object.
  • Init calls in the Console must be updated to get the correct data needed for CloudContext
  • Resources comms
    • ResourceCreated event when created
  • adding members
    • change all "owners" to "admins", who have full access to the resource #462
    • update UI to use OrganizationMembersSearch
    • update API endpoint
      • to verify that the given user is part of the organization
      • to directly add the user to the resource
      • remove user inviting logic
  • Create the migration command (see below)
  • Send emails to first admin
  • Billing section
    • Org role-based access
      • Disable button
      • Redirect on URL access
    • Usage updates
  • Comms Events
    • MemberRemoved (remove the user from all resources of the organization)
    • UserDeleted (remove the user from all the resources)
    • LicenseChanged (optional, clear cache or something)
  • Console Authorization Updates
    • Must check that the current resource's organization = user's current organization
    • Also check that the user's current organization as seen by the frontend, is the same in the backend. In case of a mismatch, fully redirect the user (location.href) to /console
  • Design lib has to be updated 2.0.3
  • Manual testing (test with a newly signed up user, not the seeded one):
    • creating a new resource when there is no active organization
    • creating a new organization from the bar
    • switching between organizations while in the console
      • at /new
      • at /console
      • at /console/{resource}
    • cannot access resources of other organizations (redirects to /console)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 94.70199% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ackend/src/Command/OrganizationsMigrateCommand.php 91.83% 4 Missing ⚠️
backend/src/Service/Project/ProjectService.php 42.85% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@sakithb sakithb marked this pull request as ready for review February 5, 2026 15:08
Copy link
Copy Markdown
Member

@supun-io supun-io left a comment

Choose a reason for hiding this comment

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

some stuff to discuss

@supun-io supun-io merged commit a4f0853 into main Feb 14, 2026
5 checks passed
@supun-io supun-io deleted the org branch February 14, 2026 13:44
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.

6 participants