Skip to content

feat: Move resource to another org from Resource Info Box #1224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Pallavikumarimdb
Copy link

@Pallavikumarimdb Pallavikumarimdb commented Aug 6, 2025

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

  • Enables resource move to a different org (via POST /resource/:resourceId/move-org)
  • Displays other available orgs in ResourceInfoBox
  • Core logic functional

✅ TODO in follow-up commits:

  • More Enhancement
  • Add tests and error edge cases
  • Add i18n translation strings

Fix: #1108

How to test?

@oschwartz10612
Copy link
Member

Looking good so far thanks for this pr!

One thing to note: we are actively working on an update that moves the siteId from the resource to the target. So there is a siteId on the target in the database and NOT on the resource. When you move a resource to a new org we might need to kick these sites off of the targets and show that somehow in the UI. We plan to have some of this merged from the target-sites branch soon.

Also one other thing I think you are thinking about a bit but is worth mentioning: when you move it the users and the roles and stuff assigned to that resource no longer apply because they are from the old org. So that all needs to be cleaned up in the database and I guess the new org will just have the current user with access. You can obviously keep the pin and pass and stuff.

Let us know if you have any questions!

@Pallavikumarimdb
Copy link
Author

Looking good so far thanks for this pr!

One thing to note: we are actively working on an update that moves the siteId from the resource to the target. So there is a siteId on the target in the database and NOT on the resource. When you move a resource to a new org we might need to kick these sites off of the targets and show that somehow in the UI. We plan to have some of this merged from the target-sites branch soon.

Also one other thing I think you are thinking about a bit but is worth mentioning: when you move it the users and the roles and stuff assigned to that resource no longer apply because they are from the old org. So that all needs to be cleaned up in the database and I guess the new org will just have the current user with access. You can obviously keep the pin and pass and stuff.

Let us know if you have any questions!

Thanks for the feedback!

I'll go ahead and implement the Permission & Access Management part — (Cleaning up the old org’s user/role associations from the resource and assigning the current user under the new org). I'll make sure the pin and pass remain intact.

For the Site-Target Relationship Handling, I'll hold off until the updates from the target-sites branch are merged.

@Pallavikumarimdb Pallavikumarimdb force-pushed the feature/Move-resource-to-another-Org branch from 3493329 to db1a85b Compare August 7, 2025 12:19
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.

2 participants