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

✨(models/api) add RBAC on templates linking accesses to a team name #6

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

sampaccoud
Copy link
Contributor

Purpose

We want to be able to control who can access a template via roles.

Proposal

I added this feature on the TeamAccess model assuming that the teams to which a user belongs can be retrieved via a get_teams method on the user model.

The idea is that this method will get the teams either via a call to an external API or directly from the OIDC token upon user login. This list of teams will probably have to be cached for each user.

@sampaccoud sampaccoud self-assigned this Mar 3, 2024
@sampaccoud sampaccoud added the enhancement New feature or request label Mar 3, 2024
We want to be able to control who can access a template via roles.
I added this feature on the TeamAccess model assuming that the teams
to which a user belongs can be retrieved via a `get_teams` method on
the user model. The idea is that this method will get the teams either
via a call to an external API or directly from the OIDC token upon
user login. This list of teams will probably have to be cached for
each user.
src/backend/core/models.py Show resolved Hide resolved
src/backend/core/models.py Show resolved Hide resolved
src/backend/core/models.py Show resolved Hide resolved
@sampaccoud sampaccoud merged commit f581eb8 into main Mar 7, 2024
7 of 10 checks passed
@AntoLC AntoLC deleted the add-rbac branch August 7, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants