Skip to content

Add/Delete User in Org/Project#737

Open
Ayush8923 wants to merge 13 commits intofeat/google-integration-auth-flowfrom
feat/add-user-project
Open

Add/Delete User in Org/Project#737
Ayush8923 wants to merge 13 commits intofeat/google-integration-auth-flowfrom
feat/add-user-project

Conversation

@Ayush8923
Copy link
Copy Markdown
Collaborator

@Ayush8923 Ayush8923 commented Apr 2, 2026

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
);

@Ayush8923 Ayush8923 self-assigned this Apr 2, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

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: d2b759e4-c761-4f55-84bd-e751d4858f7e

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.

Sign up for free to 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.

1 participant