Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: fixed error when admin create new members (#368)
Luke Zhou5891f839dadc
diff --git a/api/principal.go b/api/principal.goindex 878c40a7cc..d0956412e5 100644--- a/api/principal.go+++ b/api/principal.go@@ -94,10 +94,10 @@ type PrincipalCreate struct {// Domain specific fieldsType PrincipalType- AuthProvider PrincipalAuthProvider- Name string `jsonapi:"attr,name"`- Email string `jsonapi:"attr,email"`- Password string `jsonapi:"attr,password"`+ AuthProvider PrincipalAuthProvider `jsonapi:"attr,authProvider"`+ Name string `jsonapi:"attr,name"`+ Email string `jsonapi:"attr,email"`+ Password string `jsonapi:"attr,password"`PasswordHash string}diff --git a/frontend/src/components/MemberAddOrInvite.vue b/frontend/src/components/MemberAddOrInvite.vueindex 9fbc228062..f541cf6c47 100644--- a/frontend/src/components/MemberAddOrInvite.vue+++ b/frontend/src/components/MemberAddOrInvite.vue@@ -216,6 +216,7 @@ export default {// This could happen if another client has just created the principal// with this email.const newPrincipal: PrincipalCreate = {+ authProvider: "BYTEBASE",name: user.email.split("@")[0],email: user.email,};diff --git a/frontend/src/store/modules/principal.ts b/frontend/src/store/modules/principal.tsindex 50e3a50dbc..cddb078579 100644--- a/frontend/src/store/modules/principal.ts+++ b/frontend/src/store/modules/principal.ts@@ -88,6 +88,7 @@ const actions = {data: {type: "PrincipalCreate",attributes: {+ authProvider: newPrincipal.authProvider,name: newPrincipal.name,email: newPrincipal.email,password: randomString(),diff --git a/frontend/src/types/principal.ts b/frontend/src/types/principal.tsindex 4993b178ec..f1f295e655 100644--- a/frontend/src/types/principal.ts+++ b/frontend/src/types/principal.ts@@ -1,6 +1,7 @@// This is a facet of the underlying identity entity.// For now, there is only user type. In the future,+import { AuthProviderType } from ".";import { PrincipalId } from "./id";import { RoleType } from "./member";@@ -19,6 +20,7 @@ export type Principal = {updatedTs: number;// Domain specific fields+ authProvider: AuthProviderType;type: PrincipalType;name: string;email: string;@@ -27,6 +29,7 @@ export type Principal = {export type PrincipalCreate = {// Domain specific fields+ authProvider: AuthProviderType;name: string;email: string;};