Skip to content

Conversation

@avirajsingh7
Copy link
Collaborator

Summary

Target issue is #24

First we would like to merge #63 then this one.

This PR introduces project user management, enabling adding, removing, and listing users in a project.

Middleware & Authorization:
verify_user_project_organization(): Ensures the user belongs to the project and the organization is active, updated dependency injection to enforce project-organization checks.

@avirajsingh7
Copy link
Collaborator Author

Nishika's merge request (MR) includes the Project and Organization models, which my MR depends on.
This has changes from @nishika26 Mr also,
For easy review we can change base branch from staging to nishika PR branch
Once her MR is merged, we can merge this one to staging
Let me know, what should be best way to proceed

@jerome-white
Copy link
Contributor

For easy review we can change base branch from staging to nishika PR branch

That may be easiest. I'm seeing a few things here that I thought @nishika26 replaced (or is at least working on in her PR). I'm not sure whether to repeat the comments I made for her, or to ignore and hope they get corrected once staging is in line. Or at least I think that's what will happen -- I'm a little confused.

Otherwise, is there a way to distinguish files that are actually new from those that may get updated implicitly?

@avirajsingh7 avirajsingh7 changed the base branch from staging to feature/org_project March 18, 2025 15:47
@avirajsingh7
Copy link
Collaborator Author

@jerome-white I need to pull the latest changes from Nishika's branch, but her PR is currently showing already merged changes as new changes. Once that issue is resolved, I can take the pull, and we can proceed with the review.

@avirajsingh7 avirajsingh7 changed the base branch from feature/org_project to temp/org_proj March 19, 2025 03:41
@avirajsingh7 avirajsingh7 force-pushed the feature/project_user_mapping branch 2 times, most recently from efea9a9 to c8b4f38 Compare March 19, 2025 04:00
@avirajsingh7 avirajsingh7 changed the base branch from temp/org_proj to temp/org_proj_setup March 19, 2025 04:42
@avirajsingh7
Copy link
Collaborator Author

@jerome-white Now this has only my changes you can review this

@avirajsingh7 avirajsingh7 changed the base branch from temp/org_proj_setup to staging March 20, 2025 10:05
@avirajsingh7 avirajsingh7 changed the base branch from staging to temp/org_proj_setup March 20, 2025 10:05
@sourabhlodha sourabhlodha changed the base branch from temp/org_proj_setup to staging March 20, 2025 10:58
@avirajsingh7 avirajsingh7 force-pushed the feature/project_user_mapping branch from 3a48dd3 to 7d41a7d Compare March 20, 2025 10:58
Copy link
Contributor

@sourabhlodha sourabhlodha left a comment

Choose a reason for hiding this comment

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

changes

@avirajsingh7 avirajsingh7 added the enhancement New feature or request label Mar 21, 2025
@sourabhlodha sourabhlodha merged commit a7a2a9c into staging Mar 21, 2025
@sourabhlodha sourabhlodha deleted the feature/project_user_mapping branch March 21, 2025 08:47
sourabhlodha added a commit that referenced this pull request Mar 26, 2025
* Update README.md (#44)

* changes (#45)

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* Readme update (#47)

rename project and stack

---------

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* fix create_user endpoint (#62)

* standard api response and http exception handling (#67)

* Upgrade PostgreSQL to 16 & Fix CORS Configuration (#57)

* use latest docker image

* update envsample

* Add Customizable Token Expiry Time in Login API (#70)

* token expiry time can be customize

* default to one day

* Organization/project : Crud, Endpoint and Test Cases (#63)

* trial

* pushing all

* models file

* renaming

* Rename Project.py to project.py

* Rename oganization.py to organization.py

* Update README.md (#44)

* changes (#45)

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* Readme update (#47)

rename project and stack

---------

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* fix create_user endpoint (#62)

* standard api response and http exception handling (#67)

* standardization and edits

* small edits

* small edits

* small edits

* fixed project post

* trial

* pushing all

* models file

* renaming

* Rename Project.py to project.py

* Rename oganization.py to organization.py

* standardization and edits

* small edits

* small edits

* small edits

* fixed project post

* remove these files since they were somehow pushed into this branch

* re-push the docker file

* re-push utils file

* re-push the file

* fixing test cases

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>
Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>
Co-authored-by: Aviraj Gour <100823015+avirajsingh7@users.noreply.github.com>
Co-authored-by: Ishankoradia <ikoradia@umich.edu>

* Add Project User Management (#65)

* intial commit user project mapping and authorization

* fix alembic migration

* Use standard API response

* add pagination

* add index and use base model

* Alembic: migration fixes for organization  (#77)

* fixing testcases and migrations

* changes migration file name

* remove old migration

---------

Co-authored-by: Akhilesh Negi <akhileshnegi.an3@gmail.com>

* Added Support of API Key Authentication (#76)

* Intial setup api key

* added Api key auth flow

* support both api key and oauth

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>

* Main to stage code sync (#80)

Back merge Production to staging code

* added migration for api table (#81)

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>
Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>
Co-authored-by: Aviraj Gour <100823015+avirajsingh7@users.noreply.github.com>
Co-authored-by: Nishika Yadav <89646695+nishika26@users.noreply.github.com>
Co-authored-by: Ishankoradia <ikoradia@umich.edu>
sourabhlodha added a commit that referenced this pull request Mar 26, 2025
* Update README.md (#44)

* changes (#45)

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* Readme update (#47)

rename project and stack

---------

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* fix create_user endpoint (#62)

* standard api response and http exception handling (#67)

* Upgrade PostgreSQL to 16 & Fix CORS Configuration (#57)

* use latest docker image

* update envsample

* Add Customizable Token Expiry Time in Login API (#70)

* token expiry time can be customize

* default to one day

* Organization/project : Crud, Endpoint and Test Cases (#63)

* trial

* pushing all

* models file

* renaming

* Rename Project.py to project.py

* Rename oganization.py to organization.py

* Update README.md (#44)

* changes (#45)

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* Readme update (#47)

rename project and stack

---------

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* fix create_user endpoint (#62)

* standard api response and http exception handling (#67)

* standardization and edits

* small edits

* small edits

* small edits

* fixed project post

* trial

* pushing all

* models file

* renaming

* Rename Project.py to project.py

* Rename oganization.py to organization.py

* standardization and edits

* small edits

* small edits

* small edits

* fixed project post

* remove these files since they were somehow pushed into this branch

* re-push the docker file

* re-push utils file

* re-push the file

* fixing test cases

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>
Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>
Co-authored-by: Aviraj Gour <100823015+avirajsingh7@users.noreply.github.com>
Co-authored-by: Ishankoradia <ikoradia@umich.edu>

* Add Project User Management (#65)

* intial commit user project mapping and authorization

* fix alembic migration

* Use standard API response

* add pagination

* add index and use base model

* Alembic: migration fixes for organization  (#77)

* fixing testcases and migrations

* changes migration file name

* remove old migration

---------

Co-authored-by: Akhilesh Negi <akhileshnegi.an3@gmail.com>

* Added Support of API Key Authentication (#76)

* Intial setup api key

* added Api key auth flow

* support both api key and oauth

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>

* Main to stage code sync (#80)

Back merge Production to staging code

* added migration for api table (#81)

* Refactor Authentication Logic and Testing Enhancements (#89)

* fix authentication part

* Modify test cases to compatible with new auth

* Github: CI (#74)

* issue CI

* first stab at continuous integration

* fixing testcases and migrations

* syncing with master

* moving to python version 3.11.7

* making copy of env

* updating env

* added migrations

* added uv sync

* updating working directory

* added step to activate env

* updating working directory

* updating working directory for codecov upload

* updating script to upload to codecov

* remove working directory

* added working directory for % check

* clenaup

* cleanup

* activating env

* update the issue template

* update readme and env file

* adding badges (#91)

* OpenAI: Threads (#40)

* getting threads up and running

* added testcases and citation

* removing ssl verify

* using standardized APIResponse

* getting rid of redundant files

* refactor code after testing

* refactor testcases

* setting up init.py

* fixing review comments

* cleanup

* cleanup

* removed validate thread as it can be handled by default

* fixing few code review suggestions

* removed validation testcases for assistant ID

* threads testcases fix (#93)

* updating CI

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>
Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>
Co-authored-by: Aviraj Gour <100823015+avirajsingh7@users.noreply.github.com>
Co-authored-by: Nishika Yadav <89646695+nishika26@users.noreply.github.com>
Co-authored-by: Ishankoradia <ikoradia@umich.edu>
AkhileshNegi added a commit that referenced this pull request Apr 17, 2025
* Update README.md (#44)

* changes (#45)

* Readme update (#47)

rename project and stack

---------

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* fix create_user endpoint (#62)

* standard api response and http exception handling (#67)

* Upgrade PostgreSQL to 16 & Fix CORS Configuration (#57)

* use latest docker image

* update envsample

* Add Customizable Token Expiry Time in Login API (#70)

* token expiry time can be customize

* default to one day

* Organization/project : Crud, Endpoint and Test Cases (#63)

* trial

* pushing all

* models file

* renaming

* Rename Project.py to project.py

* Rename oganization.py to organization.py

* Update README.md (#44)

* changes (#45)

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* Readme update (#47)

rename project and stack

---------

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* fix create_user endpoint (#62)

* standard api response and http exception handling (#67)

* standardization and edits

* small edits

* small edits

* small edits

* fixed project post

* trial

* pushing all

* models file

* renaming

* Rename Project.py to project.py

* Rename oganization.py to organization.py

* standardization and edits

* small edits

* small edits

* small edits

* fixed project post

* remove these files since they were somehow pushed into this branch

* re-push the docker file

* re-push utils file

* re-push the file

* fixing test cases

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>
Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>
Co-authored-by: Aviraj Gour <100823015+avirajsingh7@users.noreply.github.com>
Co-authored-by: Ishankoradia <ikoradia@umich.edu>

* Add Project User Management (#65)

* intial commit user project mapping and authorization

* fix alembic migration

* Use standard API response

* add pagination

* add index and use base model

* Alembic: migration fixes for organization  (#77)

* fixing testcases and migrations

* changes migration file name

* remove old migration

---------

Co-authored-by: Akhilesh Negi <akhileshnegi.an3@gmail.com>

* Added Support of API Key Authentication (#76)

* Intial setup api key

* added Api key auth flow

* support both api key and oauth

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>

* Main to stage code sync (#80)

Back merge Production to staging code

* added migration for api table (#81)

* creds table

* Refactor Authentication Logic and Testing Enhancements (#89)

* fix authentication part

* Modify test cases to compatible with new auth

* Github: CI (#74)

* issue CI

* first stab at continuous integration

* fixing testcases and migrations

* syncing with master

* moving to python version 3.11.7

* making copy of env

* updating env

* added migrations

* added uv sync

* updating working directory

* added step to activate env

* updating working directory

* updating working directory for codecov upload

* updating script to upload to codecov

* remove working directory

* added working directory for % check

* clenaup

* cleanup

* activating env

* update the issue template

* update readme and env file

* adding badges (#91)

* OpenAI: Threads (#40)

* getting threads up and running

* added testcases and citation

* removing ssl verify

* using standardized APIResponse

* getting rid of redundant files

* refactor code after testing

* refactor testcases

* setting up init.py

* fixing review comments

* cleanup

* cleanup

* removed validate thread as it can be handled by default

* fixing few code review suggestions

* removed validation testcases for assistant ID

* threads testcases fix (#93)

* project router changes

* endpoint,crud and migration file

* models file

* minor fix

* fixes

* fixes

* test cases and fixes

* alembic file

* type checking

* cleaner exception

* fixing alembic revision heads

* using crendentials

* init module

* running pre commit

* running pre commit

* final changes

* migration file

* Rename fa868aa8debd_add_credetial_table.py to fa868aa8debd_add_credential_table.py

* test case change

* test cases

* test cases

* test cases

* removing duplicate lines

* datetime columns addition

* migration file

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>
Co-authored-by: Aviraj Gour <100823015+avirajsingh7@users.noreply.github.com>
Co-authored-by: Akhilesh Negi <akhileshnegi.an3@gmail.com>
priyanshu6238 pushed a commit to priyanshu6238/ai-platform that referenced this pull request Apr 23, 2025
* Update README.md (ProjectTech4DevAI#44)

* changes (ProjectTech4DevAI#45)

* Readme update (ProjectTech4DevAI#47)

rename project and stack

---------

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* fix create_user endpoint (ProjectTech4DevAI#62)

* standard api response and http exception handling (ProjectTech4DevAI#67)

* Upgrade PostgreSQL to 16 & Fix CORS Configuration (ProjectTech4DevAI#57)

* use latest docker image

* update envsample

* Add Customizable Token Expiry Time in Login API (ProjectTech4DevAI#70)

* token expiry time can be customize

* default to one day

* Organization/project : Crud, Endpoint and Test Cases (ProjectTech4DevAI#63)

* trial

* pushing all

* models file

* renaming

* Rename Project.py to project.py

* Rename oganization.py to organization.py

* Update README.md (ProjectTech4DevAI#44)

* changes (ProjectTech4DevAI#45)

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* Readme update (ProjectTech4DevAI#47)

rename project and stack

---------

Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>

* fix create_user endpoint (ProjectTech4DevAI#62)

* standard api response and http exception handling (ProjectTech4DevAI#67)

* standardization and edits

* small edits

* small edits

* small edits

* fixed project post

* trial

* pushing all

* models file

* renaming

* Rename Project.py to project.py

* Rename oganization.py to organization.py

* standardization and edits

* small edits

* small edits

* small edits

* fixed project post

* remove these files since they were somehow pushed into this branch

* re-push the docker file

* re-push utils file

* re-push the file

* fixing test cases

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>
Co-authored-by: sourabhlodha <sourabhlodha@Administrators-MacBook-Pro.local>
Co-authored-by: Aviraj Gour <100823015+avirajsingh7@users.noreply.github.com>
Co-authored-by: Ishankoradia <ikoradia@umich.edu>

* Add Project User Management (ProjectTech4DevAI#65)

* intial commit user project mapping and authorization

* fix alembic migration

* Use standard API response

* add pagination

* add index and use base model

* Alembic: migration fixes for organization  (ProjectTech4DevAI#77)

* fixing testcases and migrations

* changes migration file name

* remove old migration

---------

Co-authored-by: Akhilesh Negi <akhileshnegi.an3@gmail.com>

* Added Support of API Key Authentication (ProjectTech4DevAI#76)

* Intial setup api key

* added Api key auth flow

* support both api key and oauth

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>

* Main to stage code sync (ProjectTech4DevAI#80)

Back merge Production to staging code

* added migration for api table (ProjectTech4DevAI#81)

* creds table

* Refactor Authentication Logic and Testing Enhancements (ProjectTech4DevAI#89)

* fix authentication part

* Modify test cases to compatible with new auth

* Github: CI (ProjectTech4DevAI#74)

* issue CI

* first stab at continuous integration

* fixing testcases and migrations

* syncing with master

* moving to python version 3.11.7

* making copy of env

* updating env

* added migrations

* added uv sync

* updating working directory

* added step to activate env

* updating working directory

* updating working directory for codecov upload

* updating script to upload to codecov

* remove working directory

* added working directory for % check

* clenaup

* cleanup

* activating env

* update the issue template

* update readme and env file

* adding badges (ProjectTech4DevAI#91)

* OpenAI: Threads (ProjectTech4DevAI#40)

* getting threads up and running

* added testcases and citation

* removing ssl verify

* using standardized APIResponse

* getting rid of redundant files

* refactor code after testing

* refactor testcases

* setting up init.py

* fixing review comments

* cleanup

* cleanup

* removed validate thread as it can be handled by default

* fixing few code review suggestions

* removed validation testcases for assistant ID

* threads testcases fix (ProjectTech4DevAI#93)

* project router changes

* endpoint,crud and migration file

* models file

* minor fix

* fixes

* fixes

* test cases and fixes

* alembic file

* type checking

* cleaner exception

* fixing alembic revision heads

* using crendentials

* init module

* running pre commit

* running pre commit

* final changes

* migration file

* Rename fa868aa8debd_add_credetial_table.py to fa868aa8debd_add_credential_table.py

* test case change

* test cases

* test cases

* test cases

* removing duplicate lines

* datetime columns addition

* migration file

---------

Co-authored-by: Sourabh Lodha <sourabh_lodha@ymail.com>
Co-authored-by: Aviraj Gour <100823015+avirajsingh7@users.noreply.github.com>
Co-authored-by: Akhilesh Negi <akhileshnegi.an3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants