-
Notifications
You must be signed in to change notification settings - Fork 622
UN-2022 [FEAT] Add co-owner management for Adapters, API Deployments, Connectors, Pipelines, Workflows, Prompt Studio #1797
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
Open
kirtimanmishrazipstack
wants to merge
40
commits into
main
Choose a base branch
from
UN-2202-Add-co-owners-for-adapters-workflows-API-deployments
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 23 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
5c5e583
init c hanges
kirtimanmishrazipstack 4ef01eb
init changes
kirtimanmishrazipstack d2c6d37
init changes
kirtimanmishrazipstack 7e5ef07
changes for co-owner
kirtimanmishrazipstack 656b6ae
FE changes for co-owner
kirtimanmishrazipstack d579c8a
FE coowner management
kirtimanmishrazipstack 795f0a8
FE coowner management
kirtimanmishrazipstack 91ec5d2
FE coowner management
kirtimanmishrazipstack 91b52dc
Merge branch 'main' of github.com:Zipstack/unstract into UN-2202-Add-…
kirtimanmishrazipstack a6e99b1
Adding FE changes on api deployment co-owner
kirtimanmishrazipstack cf46432
fix for ETL, Task pipeline
kirtimanmishrazipstack 085f7e1
fix FE
kirtimanmishrazipstack 87c9942
fix FE
kirtimanmishrazipstack ea9b3eb
Compete implementation of prompt-studio + agentic prompt-studio
kirtimanmishrazipstack 69a2952
UI change
kirtimanmishrazipstack c60cd4d
UI change
kirtimanmishrazipstack 66ea6df
Merge branch 'main' of github.com:Zipstack/unstract into UN-2202-Add-…
kirtimanmishrazipstack 69c1933
worekflow UI
kirtimanmishrazipstack 6e17faa
sonarcloud issue
kirtimanmishrazipstack 4a81ed7
remocing test filew
kirtimanmishrazipstack 50fa507
solving code duplication
kirtimanmishrazipstack 9049c54
fix sonar lint issues
kirtimanmishrazipstack b2c8ab6
conflict resolve + biome check
kirtimanmishrazipstack 9a9eab6
Merge branch 'main' into UN-2202-Add-co-owners-for-adapters-workflows…
kirtimanmishrazipstack e250f94
conflitcts resolved
kirtimanmishrazipstack 70366e2
ETL+api deployment new UI changes
kirtimanmishrazipstack b296cd7
conflitcts resolved
kirtimanmishrazipstack 874078e
UN-2022 [FEAT] email notification when co-owner is added/revoked (#1815)
kirtimanmishrazipstack 4bfb980
Merge branch 'main' into UN-2202-Add-co-owners-for-adapters-workflows…
kirtimanmishrazipstack e3797fb
coderabbit review
kirtimanmishrazipstack 5bc5b60
Merge branch 'main' of github.com:Zipstack/unstract into UN-2202-Add-…
kirtimanmishrazipstack 2c2786b
PR review
kirtimanmishrazipstack 99b951c
conflicts resolve
kirtimanmishrazipstack 4a91422
conflicts resolve
kirtimanmishrazipstack 8a05862
Merge branch 'main' into UN-2202-Add-co-owners-for-adapters-workflows…
kirtimanmishrazipstack a3a44fc
sonar issues resolve
kirtimanmishrazipstack 4ba9bcf
Merge branch 'UN-2202-Add-co-owners-for-adapters-workflows-API-deploy…
kirtimanmishrazipstack 5095376
Merge branch 'main' into UN-2202-Add-co-owners-for-adapters-workflows…
kirtimanmishrazipstack cc94ec6
Merge branch 'main' into UN-2202-Add-co-owners-for-adapters-workflows…
kirtimanmishrazipstack 331be44
Merge branch 'main' into UN-2202-Add-co-owners-for-adapters-workflows…
ritwik-g File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
backend/adapter_processor_v2/migrations/0004_adapterinstance_co_owners.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Generated by Django 4.2.1 on 2026-02-17 08:24 | ||
|
|
||
| from django.conf import settings | ||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
| ("adapter_processor_v2", "0003_mark_deprecated_adapters"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name="adapterinstance", | ||
| name="co_owners", | ||
| field=models.ManyToManyField( | ||
| blank=True, | ||
| help_text="Users with full ownership privileges", | ||
| related_name="co_owned_adapters", | ||
| to=settings.AUTH_USER_MODEL, | ||
| ), | ||
| ), | ||
| ] |
21 changes: 21 additions & 0 deletions
21
backend/adapter_processor_v2/migrations/0005_backfill_creator_to_co_owners.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| from django.db import migrations | ||
|
|
||
|
|
||
| def backfill_creator_to_co_owners(apps, schema_editor): | ||
| adapter_instance_model = apps.get_model("adapter_processor_v2", "AdapterInstance") | ||
| for adapter in adapter_instance_model.objects.filter(created_by__isnull=False): | ||
| if not adapter.co_owners.filter(id=adapter.created_by_id).exists(): | ||
| adapter.co_owners.add(adapter.created_by) | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("adapter_processor_v2", "0004_adapterinstance_co_owners"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RunPython( | ||
| backfill_creator_to_co_owners, | ||
| reverse_code=migrations.RunPython.noop, | ||
| ), | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Generated by Django 4.2.1 on 2026-02-17 08:24 | ||
|
|
||
| from django.conf import settings | ||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
| ("api_v2", "0003_add_organization_rate_limit"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name="apideployment", | ||
| name="co_owners", | ||
| field=models.ManyToManyField( | ||
| blank=True, | ||
| help_text="Users with full ownership privileges", | ||
| related_name="co_owned_api_deployments", | ||
| to=settings.AUTH_USER_MODEL, | ||
| ), | ||
| ), | ||
| ] |
21 changes: 21 additions & 0 deletions
21
backend/api_v2/migrations/0005_backfill_creator_to_co_owners.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| from django.db import migrations | ||
|
|
||
|
|
||
| def backfill_creator_to_co_owners(apps, schema_editor): | ||
| api_deployment_model = apps.get_model("api_v2", "APIDeployment") | ||
| for deployment in api_deployment_model.objects.filter(created_by__isnull=False): | ||
| if not deployment.co_owners.filter(id=deployment.created_by_id).exists(): | ||
| deployment.co_owners.add(deployment.created_by) | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("api_v2", "0004_apideployment_co_owners"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RunPython( | ||
| backfill_creator_to_co_owners, | ||
| reverse_code=migrations.RunPython.noop, | ||
| ), | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does it require to have post/delete operation cant it use existing patch operation? @kirtimanmishrazipstack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnyrahul co_owners is a separate concept from shared_users, and the dedicated endpoints provide better validation (e.g., preventing removal of the last owner)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirtimanmishrazipstack one clarification: Then why don't we expand the shared users with WRITE/Updated permission instaed of new co-owners entity.?
cc: @hari-kuriakose