Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbac_role_assigment primary key is too limiting in rbac-tables.pg.up.sql #1

Closed
iarenaza opened this issue Jun 21, 2021 · 1 comment
Closed

Comments

@iarenaza
Copy link
Contributor

Currently the primary key for rbac_role_assignment is defined as follows in rbac-tables.pg.up.sql:

PRIMARY KEY (role_id, context_id)

That definition prevents a role from begin assigned to more than one user on a given context. Which is an unexpected and undesired limitation. In order to overcome that limitation we need to add the user user_id column to the primary key too.

PRIMARY KEY (role_id, context_id, user_id)
iarenaza added a commit that referenced this issue Jun 21, 2021
Currently the primary key for rbac_role_assignment is defined as
follows in rbac-tables.pg.up.sql:

    PRIMARY KEY (role_id, context_id)

That definition prevents a role from begin assigned to more than one
user on a given context. Which is an unexpected and undesired
limitation. In order to overcome that limitation we need to add the
user user_id column to the primary key too.

    PRIMARY KEY (role_id, context_id, user_id)

[Re: #1]
@iarenaza
Copy link
Contributor Author

Fixed in commit c82ed80

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

No branches or pull requests

1 participant