Skip to content

Add/Delete User in Org/Project - #737

Merged
Ayush8923 merged 14 commits into
feat/google-integration-auth-flowfrom
feat/add-user-project
Apr 9, 2026
Merged

Add/Delete User in Org/Project#737
Ayush8923 merged 14 commits into
feat/google-integration-auth-flowfrom
feat/add-user-project

Conversation

@Ayush8923

@Ayush8923Ayush8923 commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

Target issue: #731

Summary

  • Created the API Endpoint where to add the more user in the corresponding to Org/Project.
  • Created the user_project table where we have the mapping of user corresponding to their org and project for tracking.
  • Mark the user is_active=True after google login and when super admin add the new user in corresponding to any project then mark the is_active=False.
  • Handle Project Permission

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.
  • If you've fixed a bug or added code that is tested and has test cases.

Notes

To sync existing users and their corresponding org/project with the new user_project table, we need to run this query.

INSERT INTO user_project (user_id, organization_id, project_id, inserted_at)
SELECT DISTINCT ak.user_id, ak.organization_id, ak.project_id, NOW()
FROM apikey ak
WHERE ak.is_deleted = false
AND NOT EXISTS (
SELECT 1 FROM user_project up
WHERE up.user_id = ak.user_id
AND up.project_id = ak.project_id
);

@Ayush8923Ayush8923 self-assigned this Apr 2, 2026
@coderabbitai

coderabbitaiBot commented Apr 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 98cff627-4e47-422b-ad03-e137ab7478e1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-user-project

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@@ -34,8 +35,24 @@


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should we have commont auth.py route instead of google_auth.py?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Done, updated.

@Ayush8923Ayush8923 mentioned this pull request Apr 8, 2026
2 tasks
@Ayush8923
Ayush8923 merged commit 74d252b into feat/google-integration-auth-flowApr 9, 2026
1 check passed
@Ayush8923
Ayush8923 deleted the feat/add-user-project branch April 9, 2026 11:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Ayush8923@Prajna1999@vprashrex