-
Notifications
You must be signed in to change notification settings - Fork 1
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
[#346] Fix configs to support multi-tenancy #359
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shurwit & @roberlander2,
I'm getting compile issues:
Build Error: go build -o /Users/mladen/Projects/groups-building-block/__debug_bin -gcflags all=-N -l .
groups/core
core/administration.go:50:15: claims.CanAccess undefined (type *tokenauth.Claims has no field or method CanAccess)
core/administration.go:66:20: claims.CanAccess undefined (type *tokenauth.Claims has no field or method CanAccess)
core/administration.go:79:16: claims.CanAccess undefined (type *tokenauth.Claims has no field or method CanAccess)
core/administration.go:111:15: claims.CanAccess undefined (type *tokenauth.Claims has no field or method CanAccess)
core/administration.go:136:15: claims.CanAccess undefined (type *tokenauth.Claims has no field or method CanAccess) (exit status 1)
Also my understanding was that I could mainly comment and I have to wait for an explicit conformation by @shurwit before do any significiant review on my side. It looks that's not the case.
Dockerfile
Outdated
@@ -1,4 +1,4 @@ | |||
FROM golang:1.19-bullseye as builder | |||
FROM golang:1.20.1-buster as builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor version is not a good approach, because it obligates to upgrade version periodiaclly. When it's omittied it means to use the latest minor version during the build time.
I think it's better to use bullseye, unless there is a reason to use buster which I dont see.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this @mdryankov, I will remove the minor version and make the change to bullseye. If I understand correctly, the reason to use bullseye over buster is because bullseye is the codename for the latest stable Debian release, so the buster release is now old.
Please let me know if I am missing anything with this explanation. Thanks!
err = json.Unmarshal(data, &requestData) | ||
err := json.NewDecoder(r.Body).Decode(&requestData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful!
Thanks @mdryankov, these compile issues are due to this PR's dependence on rokwire/core-auth-library-go#86, which has not been added to a new version of the auth library yet. We plan to make this new release version soon. I will let you know when the new release has been integrated into this PR. |
Let me know expplicitly when this one is good to go. Thanks! |
Description
This PR replaces the
client_id
field with anapp_id
field and anorg_id
field in all data models and existing database documents to support multi-tenancy. It also makes changes to theconfigs
collection by merging it with themanaged_group_configs
collection and adding themodel.Config
wrapper around existing config models to better handle multi-tenancy.Depends on rokwire/core-auth-library-go#86
Resolves #346
Resolves #224
Review Time Estimate
Please give your idea of how soon this pull request needs to be reviewed by selecting one of the options below. This can be based on the criticality of the issue at hand and/or other relevant factors.
Type of changes
Please select a relevant option:
Checklist:
Please select all applicable options: