Add tools and update authenticztion and RBAC
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -2,7 +2,7 @@ package console_v1
|
||||
|
||||
// This file will be automatically regenerated based on the schema, any resolver implementations
|
||||
// will be copied through when generating and any unknown code will be moved to the end.
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.76
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.83
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -23,6 +23,7 @@ import (
|
||||
"go.probo.inc/probo/pkg/probo"
|
||||
"go.probo.inc/probo/pkg/server/api/console/v1/schema"
|
||||
"go.probo.inc/probo/pkg/server/api/console/v1/types"
|
||||
serverauth "go.probo.inc/probo/pkg/server/auth"
|
||||
"go.probo.inc/probo/pkg/server/gqlutils"
|
||||
)
|
||||
|
||||
@@ -1451,9 +1452,9 @@ func (r *mutationResolver) CreateOrganization(ctx context.Context, input types.C
|
||||
}
|
||||
|
||||
// Append tenant to allowed one
|
||||
access, _ := ctx.Value(userTenantContextKey).(*userTenantAccess)
|
||||
access := serverauth.UserTenantAccessFromContext(ctx)
|
||||
if access != nil {
|
||||
access.tenantIDs = append(access.tenantIDs, organization.ID.TenantID())
|
||||
access.TenantIDs = append(access.TenantIDs, organization.ID.TenantID())
|
||||
}
|
||||
|
||||
return &types.CreateOrganizationPayload{
|
||||
|
||||
Reference in New Issue
Block a user