Draft: feat: add organization_id to SSH keys
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
Relates to issue #577243
This MR was created by Duo in Session 1180514
Changes
- Update Key model to automatically populate organization_id field
- Add model validation to ensure organization_id is present for new records
- Update Keys::CreateService to set organization_id from user's organization
- Add callback to derive organization_id from user if not explicitly provided
- Handle edge cases where user might not have an organization
- Add comprehensive tests for organization_id handling
Edited by 🤖 GitLab Bot 🤖