Skip to content

Teams feature cannot manage authorization above the team's scope #2349

Answered by mohamedds-12
mohamedds-12 asked this question in Q&A
Discussion options

You must be logged in to vote

Eventually, after searching and asking other senior engineers I ended up going with the polymorphic solution :

I've tried going for a polymorphic relationship which basically means a user can have a role either in an event or an organization like so: user_id, role_id, entity_id, entity_type, But it's a lot of work and I don't know if it's the ideal solution.

It's a little complicated, but here is the breakdown of the steps :

  1. Polymorphic Relationship:

    • Establish a polymorphic relationship between the teams table and the events and organizations tables. This allows a team to belong to either an event or an organization.
  2. Creating Teams for Organizations:

    • Create a team for each organi…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@mohamedds-12
Comment options

@erikn69
Comment options

@mohamedds-12
Comment options

@yungifez
Comment options

@mohamedds-12
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by mohamedds-12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants