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

Adding organization_feature_access table & functionality #796

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

carere
Copy link
Contributor

@carere carere commented Jan 8, 2025

No description provided.

@carere carere requested a review from Pascal-Delange January 8, 2025 10:40
Copy link
Contributor

@Pascal-Delange Pascal-Delange left a comment

Choose a reason for hiding this comment

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

Thanks !
I left you some comments in the PR body.
The two main points I have to add here:

  • at a high level, the idea is that the front no longer stores the license key, instead calls this new endpoint on the backend that will: read feature accesses, merge them with the features available on the license (which the backend validates with our license server), and return the merged set of features to the frontend
  • as a result, while the API return DTO should contain all the relevant features, we only need to specifically store in the DB at the org level, those that we want to set at the org level. That is: sanctions, test run (as of today). So you can simplify by reducing the nb of features we store.
  • last point, for orgs we create internally, the API should accept a list of features to add when the org is created, so we should add this input in the org creation API DTO, and pass it over to the org creation repository (end customers who self-host are not expected to use this)

dto/organization_feature_access_dto.go Outdated Show resolved Hide resolved
dto/organization_feature_access_dto.go Outdated Show resolved Hide resolved
repositories/dbmodels/db_organization_feature_access.go Outdated Show resolved Hide resolved
models/organization_feature_access.go Show resolved Hide resolved
models/organization_feature_access.go Show resolved Hide resolved
api/routes.go Show resolved Hide resolved
repositories/organization_repository.go Show resolved Hide resolved
usecases/organization_usecase.go Outdated Show resolved Hide resolved
@carere carere self-assigned this Jan 8, 2025
@carere carere marked this pull request as ready for review January 9, 2025 13:25
@carere carere force-pushed the feature/add-organization-feature-access branch from feee8a9 to bb88dfd Compare January 9, 2025 14:37
@carere carere requested a review from Pascal-Delange January 9, 2025 14:49
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