[WHATIF] Remove active_analytics and simplify AccessRequest STI#328
Closed
yshmarov wants to merge 4 commits into
Closed
[WHATIF] Remove active_analytics and simplify AccessRequest STI#328yshmarov wants to merge 4 commits into
yshmarov wants to merge 4 commits into
Conversation
- Remove active_analytics gem from Gemfile - Remove analytics mount from admin routes - Remove Analytics concern from ApplicationController - Delete Analytics concern file - Add migration to drop active_analytics tables Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… models Simplify the access request system by replacing the STI-based AccessRequest model with two distinct, focused models: - OrganizationInvitation: For when an organization invites a user to join - JoinRequest: For when a user requests to join an organization Benefits: - Each model has clear, single responsibility - No STI inheritance to understand - Easier to extend independently - More explicit naming Changes: - Create OrganizationInvitation model with pending/approved/rejected status - Create JoinRequest model with pending/approved/rejected status - Update Organization associations to use new models - Update User associations to use new models - Update controllers and views to reference new models - Update all tests and fixtures - Remove old AccessRequest model and STI subclasses - Add migrations for new tables and dropping old table Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
End-to-end tests covering: - Admin sending invitations to new users - Admin canceling pending invitations - User accepting/declining invitations - User requesting to join restricted organizations - User canceling pending join requests - Admin approving/rejecting join requests - User directly joining public organizations - Join requests tab visibility for restricted organizations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Track the user who approves or rejects organization invitations and join requests by adding a completed_by reference. Improve error handling and validation for join requests and invitations, including checks for membership status and pending state. Add notifications for admins when a join request is created, update translations, and enhance related tests for new behaviors.
Owner
Author
|
vibecoded. interesting idea with different approach to invitations. not priority now |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Changes
Task 1: Remove Active Analytics
active_analyticsgem from GemfileTask 2: Simplify AccessRequests
Replace the STI-based AccessRequest system with two distinct models:
Before (Complex STI):
After (Simple, focused models):
Benefits:
Test plan
🤖 Generated with Claude Code