Poseidon/feature/license management#145
Open
Yasserelhaddar wants to merge 15 commits intoposeidon/devfrom
Open
Poseidon/feature/license management#145Yasserelhaddar wants to merge 15 commits intoposeidon/devfrom
Yasserelhaddar wants to merge 15 commits intoposeidon/devfrom
Conversation
- Create ProjectAssignment model to handle many-to-many relationships between users and projects - Includes role assignment (Inspector/Viewer) and assignment metadata - Supports immutable business rule for organization admin auto-assignment
- Add is_admin(), is_super_admin(), is_admin_or_higher() utility methods - Add get_manageable_roles() for role management logic - Improve type safety and code organization for role handling
- Register ProjectAssignment model in database initialization - Update model imports to include new ProjectAssignment
- Add assign_to_project() and remove_from_project() methods using ProjectAssignment model - Implement immutable business rule: org admins cannot be removed from organization projects - Fix Link object access issues with proper fetch_all_links() calls - Use OrgRole enum constants for consistent role comparisons - Add cross-organization validation and security checks
- Add authentication validation to all critical service methods - Implement _validate_super_admin() for privilege escalation prevention - Add cross-organization validation and access control - Fix auto-assignment of organization admins to all projects as viewers - Ensure defense-in-depth security architecture
- Add super admin filtering - super admins invisible to regular admins and each other in user management - Implement can_manage_user_projects() with immutable business rules - Fix organizational isolation between super admins (SYSTEM org) and regular users - Add comprehensive permission checks for user management operations - Use OrgRole enum constants throughout for type safety
- Hide 'Manage Projects' button for admin users, show 'Auto-managed' instead - Implement proper role-based button visibility using OrgRole enum - Fix project assignment display to show project names instead of IDs - Add role display formatting for project assignments
- Convert UserRoles and ProjectRoles to compatibility wrappers for centralized enums - Update UserData model to use OrgRole enum constants - Maintain backward compatibility while enforcing enum usage - Clean up duplicate enum definitions
- Add OrgRole and ProjectRole imports to all component files - Replace hardcoded role strings with enum constants throughout - Update role comparison logic to use type-safe enum values - Enhance role filtering and color mapping with consistent enum usage
- Update project management page to use OrgRole.ADMIN - Add ProjectAssignment reference imports to User model - Ensure 100% consistent enum usage throughout codebase
- Add ProjectLicense model with validation logic - Implement LicenseRepository for data access operations - Add LicenseService with business logic and role validation - Support license creation, renewal, cancellation operations - Include license statistics and expiry management
- Implement license management UI components with status badges - Add license table with filtering and pagination - Create dialogs for issuing, renewing, and viewing licenses - Implement LicenseManagementState with role-based access control - Support license statistics overview and expiry alerts
- Add LicenseStatus enum with display names - Register ProjectLicense model in database init - Add LicenseData model for UI state management - Support license status tracking and validation
- Add license management sidebar navigation item - Register license management page route - Update management pages module exports - Enable role-based access to license management features
- Update utilities with improved enum handling - Add project assignment validation and filtering - Implement role-based project access controls - Support organization-scoped project operations
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.
License Management System Implementation
Summary
Complete implementation of a project license management system for Poseidon with role-based access control, enabling super admins to issue, renew, and manage project licenses.
🚀 Features Added
Backend Implementation
Frontend Implementation
Key Capabilities
📊 Changes Overview
Note: Scopping access is another feature not currently implemented. I would like to discuss our options to scope the relevant pages (Camera Configurator, Inference, Deployment and Image Viewer)