Skip to content

Conversation

jiparis
Copy link
Member

@jiparis jiparis commented Jun 16, 2025

This PR adds new database fields (MembershipType, MemberID, ResourceType and ResourceID) to support flexible RBAC schemas at different levels (organizations, projects) using different role sources (users, groups, teams...).

The data layer logic has been updated to maintain the current behaviour. A migration is also included.

jiparis added 5 commits June 16, 2025 20:06
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis requested review from javirln and migmartri June 16, 2025 21:02
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>

func (Membership) Edges() []ent.Edge {
return []ent.Edge{
// Deprecated: use polymorphic membership instead
Copy link
Member

Choose a reason for hiding this comment

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

how difficult do you think it would be to kill those columns?

I am ok if we keep it in multiple steps though

Copy link
Member Author

@jiparis jiparis Jun 17, 2025

Choose a reason for hiding this comment

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

I think I can create an additional migration for it, but in a different version, not to break compatibility.

@jiparis jiparis merged commit 67ba031 into chainloop-dev:main Jun 17, 2025
13 checks passed
@jiparis jiparis deleted the PFM-3164 branch June 17, 2025 10:43
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