Skip to content

Fix: 177 Poseidon Enhancements#178

Open
uzairali19 wants to merge 3 commits into520-component-tablefrom
177-fix-poseidon-enhancements
Open

Fix: 177 Poseidon Enhancements#178
uzairali19 wants to merge 3 commits into520-component-tablefrom
177-fix-poseidon-enhancements

Conversation

@uzairali19
Copy link
Contributor

@uzairali19 uzairali19 commented Sep 10, 2025

This pull request refactors the user model and repository logic to simplify user identity, improve role handling, and enhance data consistency. The most significant changes include removing the username field, standardizing organization roles to strings, normalizing email addresses, and reorganizing repository methods for clarity and maintainability.

User model and identity changes:

  • Removed the username field from the User model and all related code, relying solely on email for user identity. [1] [2]

Data normalization and validation:

  • Added normalization of email addresses to lowercase both on creation and update, and enforced this in repository methods and model lifecycle hooks. [1] [2] [3]

Repository API and logic improvements:

  • Refactored repository methods to remove legacy logic (e.g., handling username, project_assignments, and multi-role lists), and grouped methods into clear "reads" and "writes" sections. [1] [2] [3]
  • Improved error handling and link fetching for all user-related operations, ensuring returned users have fully populated relationships. [1] [2] [3] [4] [5]

Role and relationship handling:

  • Updated methods for assigning/removing users from projects and updating organization roles to work with string or enum inputs, and to avoid duplicates or legacy issues. [1] [2] [3]

These changes streamline user management, improve reliability, and set the foundation for future enhancements.

@uzairali19 uzairali19 self-assigned this Sep 10, 2025
@uzairali19 uzairali19 requested review from a user, Yasserelhaddar and canelbirlik and removed request for canelbirlik September 10, 2025 15:17
@@ -0,0 +1,5 @@
from poseidon.components_v2.core.button import button
Copy link
Contributor

Choose a reason for hiding this comment

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

don't think we need to create a wrapper to just call these modern :D same with other components in forms/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just took the current code we had and put them in separate components, I know these are empty wrappers. I'll remove them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants