@@ -650,6 +650,7 @@ input CreatePolicyInput {
|
||||
content: String!
|
||||
status: PolicyStatus!
|
||||
reviewDate: Datetime
|
||||
ownerId: ID!
|
||||
}
|
||||
|
||||
input UpdatePolicyInput {
|
||||
@@ -659,6 +660,7 @@ input UpdatePolicyInput {
|
||||
content: String
|
||||
status: PolicyStatus
|
||||
reviewDate: Datetime
|
||||
ownerId: ID
|
||||
}
|
||||
|
||||
input DeletePolicyInput {
|
||||
@@ -684,6 +686,7 @@ type Policy implements Node {
|
||||
status: PolicyStatus!
|
||||
content: String!
|
||||
reviewDate: Datetime
|
||||
owner: People! @goField(forceResolver: true)
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ type ResolverRoot interface {
|
||||
Framework() FrameworkResolver
|
||||
Mutation() MutationResolver
|
||||
Organization() OrganizationResolver
|
||||
Policy() PolicyResolver
|
||||
Query() QueryResolver
|
||||
Task() TaskResolver
|
||||
User() UserResolver
|
||||
@@ -289,6 +290,7 @@ type ComplexityRoot struct {
|
||||
CreatedAt func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Name func(childComplexity int) int
|
||||
Owner func(childComplexity int) int
|
||||
ReviewDate func(childComplexity int) int
|
||||
Status func(childComplexity int) int
|
||||
UpdatedAt func(childComplexity int) int
|
||||
@@ -459,6 +461,9 @@ type OrganizationResolver interface {
|
||||
Peoples(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.PeopleConnection, error)
|
||||
Policies(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.PolicyConnection, error)
|
||||
}
|
||||
type PolicyResolver interface {
|
||||
Owner(ctx context.Context, obj *types.Policy) (*types.People, error)
|
||||
}
|
||||
type QueryResolver interface {
|
||||
Node(ctx context.Context, id gid.GID) (types.Node, error)
|
||||
Viewer(ctx context.Context) (*types.User, error)
|
||||
@@ -1498,6 +1503,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Policy.Name(childComplexity), true
|
||||
|
||||
case "Policy.owner":
|
||||
if e.complexity.Policy.Owner == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Policy.Owner(childComplexity), true
|
||||
|
||||
case "Policy.reviewDate":
|
||||
if e.complexity.Policy.ReviewDate == nil {
|
||||
break
|
||||
@@ -2743,6 +2755,7 @@ input CreatePolicyInput {
|
||||
content: String!
|
||||
status: PolicyStatus!
|
||||
reviewDate: Datetime
|
||||
ownerId: ID!
|
||||
}
|
||||
|
||||
input UpdatePolicyInput {
|
||||
@@ -2752,6 +2765,7 @@ input UpdatePolicyInput {
|
||||
content: String
|
||||
status: PolicyStatus
|
||||
reviewDate: Datetime
|
||||
ownerId: ID
|
||||
}
|
||||
|
||||
input DeletePolicyInput {
|
||||
@@ -2777,6 +2791,7 @@ type Policy implements Node {
|
||||
status: PolicyStatus!
|
||||
content: String!
|
||||
reviewDate: Datetime
|
||||
owner: People! @goField(forceResolver: true)
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
@@ -9518,6 +9533,62 @@ func (ec *executionContext) fieldContext_Policy_reviewDate(_ context.Context, fi
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Policy_owner(ctx context.Context, field graphql.CollectedField, obj *types.Policy) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Policy_owner(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Policy().Owner(rctx, obj)
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
if !graphql.HasFieldError(ctx, fc) {
|
||||
ec.Errorf(ctx, "must not be null")
|
||||
}
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*types.People)
|
||||
fc.Result = res
|
||||
return ec.marshalNPeople2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋapiᚋconsoleᚋv1ᚋtypesᚐPeople(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Policy_owner(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Policy",
|
||||
Field: field,
|
||||
IsMethod: true,
|
||||
IsResolver: true,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
switch field.Name {
|
||||
case "id":
|
||||
return ec.fieldContext_People_id(ctx, field)
|
||||
case "fullName":
|
||||
return ec.fieldContext_People_fullName(ctx, field)
|
||||
case "primaryEmailAddress":
|
||||
return ec.fieldContext_People_primaryEmailAddress(ctx, field)
|
||||
case "additionalEmailAddresses":
|
||||
return ec.fieldContext_People_additionalEmailAddresses(ctx, field)
|
||||
case "kind":
|
||||
return ec.fieldContext_People_kind(ctx, field)
|
||||
case "createdAt":
|
||||
return ec.fieldContext_People_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
return ec.fieldContext_People_updatedAt(ctx, field)
|
||||
case "version":
|
||||
return ec.fieldContext_People_version(ctx, field)
|
||||
}
|
||||
return nil, fmt.Errorf("no field named %q was found under type People", field.Name)
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Policy_createdAt(ctx context.Context, field graphql.CollectedField, obj *types.Policy) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Policy_createdAt(ctx, field)
|
||||
if err != nil {
|
||||
@@ -9769,6 +9840,8 @@ func (ec *executionContext) fieldContext_PolicyEdge_node(_ context.Context, fiel
|
||||
return ec.fieldContext_Policy_content(ctx, field)
|
||||
case "reviewDate":
|
||||
return ec.fieldContext_Policy_reviewDate(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_Policy_owner(ctx, field)
|
||||
case "createdAt":
|
||||
return ec.fieldContext_Policy_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
@@ -11193,6 +11266,8 @@ func (ec *executionContext) fieldContext_UpdatePolicyPayload_policy(_ context.Co
|
||||
return ec.fieldContext_Policy_content(ctx, field)
|
||||
case "reviewDate":
|
||||
return ec.fieldContext_Policy_reviewDate(ctx, field)
|
||||
case "owner":
|
||||
return ec.fieldContext_Policy_owner(ctx, field)
|
||||
case "createdAt":
|
||||
return ec.fieldContext_Policy_createdAt(ctx, field)
|
||||
case "updatedAt":
|
||||
@@ -14016,7 +14091,7 @@ func (ec *executionContext) unmarshalInputCreatePolicyInput(ctx context.Context,
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"organizationId", "name", "content", "status", "reviewDate"}
|
||||
fieldsInOrder := [...]string{"organizationId", "name", "content", "status", "reviewDate", "ownerId"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -14058,6 +14133,13 @@ func (ec *executionContext) unmarshalInputCreatePolicyInput(ctx context.Context,
|
||||
return it, err
|
||||
}
|
||||
it.ReviewDate = data
|
||||
case "ownerId":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ownerId"))
|
||||
data, err := ec.unmarshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.OwnerID = data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14536,7 +14618,7 @@ func (ec *executionContext) unmarshalInputUpdatePolicyInput(ctx context.Context,
|
||||
asMap[k] = v
|
||||
}
|
||||
|
||||
fieldsInOrder := [...]string{"id", "expectedVersion", "name", "content", "status", "reviewDate"}
|
||||
fieldsInOrder := [...]string{"id", "expectedVersion", "name", "content", "status", "reviewDate", "ownerId"}
|
||||
for _, k := range fieldsInOrder {
|
||||
v, ok := asMap[k]
|
||||
if !ok {
|
||||
@@ -14585,6 +14667,13 @@ func (ec *executionContext) unmarshalInputUpdatePolicyInput(ctx context.Context,
|
||||
return it, err
|
||||
}
|
||||
it.ReviewDate = data
|
||||
case "ownerId":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ownerId"))
|
||||
data, err := ec.unmarshalOID2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
it.OwnerID = data
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16945,39 +17034,70 @@ func (ec *executionContext) _Policy(ctx context.Context, sel ast.SelectionSet, o
|
||||
case "id":
|
||||
out.Values[i] = ec._Policy_id(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "version":
|
||||
out.Values[i] = ec._Policy_version(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "name":
|
||||
out.Values[i] = ec._Policy_name(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "status":
|
||||
out.Values[i] = ec._Policy_status(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "content":
|
||||
out.Values[i] = ec._Policy_content(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "reviewDate":
|
||||
out.Values[i] = ec._Policy_reviewDate(ctx, field, obj)
|
||||
case "owner":
|
||||
field := field
|
||||
|
||||
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
|
||||
res = ec._Policy_owner(ctx, field, obj)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&fs.Invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
if field.Deferrable != nil {
|
||||
dfs, ok := deferred[field.Deferrable.Label]
|
||||
di := 0
|
||||
if ok {
|
||||
dfs.AddField(field)
|
||||
di = len(dfs.Values) - 1
|
||||
} else {
|
||||
dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
|
||||
deferred[field.Deferrable.Label] = dfs
|
||||
}
|
||||
dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
|
||||
return innerFunc(ctx, dfs)
|
||||
})
|
||||
|
||||
// don't run the out.Concurrently() call below
|
||||
out.Values[i] = graphql.Null
|
||||
continue
|
||||
}
|
||||
|
||||
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
|
||||
case "createdAt":
|
||||
out.Values[i] = ec._Policy_createdAt(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "updatedAt":
|
||||
out.Values[i] = ec._Policy_updatedAt(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
out.Invalids++
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
@@ -19276,6 +19396,10 @@ func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋgetproboᚋprobo
|
||||
return ec._PageInfo(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNPeople2githubᚗcomᚋgetproboᚋproboᚋpkgᚋapiᚋconsoleᚋv1ᚋtypesᚐPeople(ctx context.Context, sel ast.SelectionSet, v types.People) graphql.Marshaler {
|
||||
return ec._People(ctx, sel, &v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNPeople2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋapiᚋconsoleᚋv1ᚋtypesᚐPeople(ctx context.Context, sel ast.SelectionSet, v *types.People) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
@@ -20333,6 +20457,22 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
func (ec *executionContext) unmarshalOID2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx context.Context, v any) (*gid.GID, error) {
|
||||
if v == nil {
|
||||
return nil, nil
|
||||
}
|
||||
res, err := types.UnmarshalGIDScalar(v)
|
||||
return &res, graphql.ErrorOnPath(ctx, err)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOID2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx context.Context, sel ast.SelectionSet, v *gid.GID) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := types.MarshalGIDScalar(*v)
|
||||
return res
|
||||
}
|
||||
|
||||
func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v any) (*int, error) {
|
||||
if v == nil {
|
||||
return nil, nil
|
||||
|
||||
@@ -108,6 +108,7 @@ type CreatePolicyInput struct {
|
||||
Content string `json:"content"`
|
||||
Status coredata.PolicyStatus `json:"status"`
|
||||
ReviewDate *time.Time `json:"reviewDate,omitempty"`
|
||||
OwnerID gid.GID `json:"ownerId"`
|
||||
}
|
||||
|
||||
type CreatePolicyPayload struct {
|
||||
@@ -322,6 +323,7 @@ type Policy struct {
|
||||
Status coredata.PolicyStatus `json:"status"`
|
||||
Content string `json:"content"`
|
||||
ReviewDate *time.Time `json:"reviewDate,omitempty"`
|
||||
Owner *People `json:"owner"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
@@ -434,6 +436,7 @@ type UpdatePolicyInput struct {
|
||||
Content *string `json:"content,omitempty"`
|
||||
Status *coredata.PolicyStatus `json:"status,omitempty"`
|
||||
ReviewDate *time.Time `json:"reviewDate,omitempty"`
|
||||
OwnerID *gid.GID `json:"ownerId,omitempty"`
|
||||
}
|
||||
|
||||
type UpdatePolicyPayload struct {
|
||||
|
||||
@@ -383,6 +383,7 @@ func (r *mutationResolver) CreatePolicy(ctx context.Context, input types.CreateP
|
||||
Content: input.Content,
|
||||
Status: input.Status,
|
||||
ReviewDate: input.ReviewDate,
|
||||
OwnerID: input.OwnerID,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot create policy: %w", err)
|
||||
@@ -402,6 +403,7 @@ func (r *mutationResolver) UpdatePolicy(ctx context.Context, input types.UpdateP
|
||||
Content: input.Content,
|
||||
Status: input.Status,
|
||||
ReviewDate: input.ReviewDate,
|
||||
OwnerID: input.OwnerID,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot update policy: %w", err)
|
||||
@@ -472,6 +474,22 @@ func (r *organizationResolver) Policies(ctx context.Context, obj *types.Organiza
|
||||
return types.NewPolicyConnection(page), nil
|
||||
}
|
||||
|
||||
// Owner is the resolver for the owner field.
|
||||
func (r *policyResolver) Owner(ctx context.Context, obj *types.Policy) (*types.People, error) {
|
||||
policy, err := r.proboSvc.Policies.Get(ctx, obj.ID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot get policy: %w", err)
|
||||
}
|
||||
|
||||
// Get the owner
|
||||
owner, err := r.proboSvc.GetPeople(ctx, policy.OwnerID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot get owner: %w", err)
|
||||
}
|
||||
|
||||
return types.NewPeople(owner), nil
|
||||
}
|
||||
|
||||
// Node is the resolver for the node field.
|
||||
func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error) {
|
||||
switch id.EntityType() {
|
||||
@@ -613,6 +631,9 @@ func (r *Resolver) Mutation() schema.MutationResolver { return &mutationResolver
|
||||
// Organization returns schema.OrganizationResolver implementation.
|
||||
func (r *Resolver) Organization() schema.OrganizationResolver { return &organizationResolver{r} }
|
||||
|
||||
// Policy returns schema.PolicyResolver implementation.
|
||||
func (r *Resolver) Policy() schema.PolicyResolver { return &policyResolver{r} }
|
||||
|
||||
// Query returns schema.QueryResolver implementation.
|
||||
func (r *Resolver) Query() schema.QueryResolver { return &queryResolver{r} }
|
||||
|
||||
@@ -627,6 +648,7 @@ type evidenceResolver struct{ *Resolver }
|
||||
type frameworkResolver struct{ *Resolver }
|
||||
type mutationResolver struct{ *Resolver }
|
||||
type organizationResolver struct{ *Resolver }
|
||||
type policyResolver struct{ *Resolver }
|
||||
type queryResolver struct{ *Resolver }
|
||||
type taskResolver struct{ *Resolver }
|
||||
type userResolver struct{ *Resolver }
|
||||
|
||||
1
pkg/probo/coredata/migrations/20250305T111053Z.sql
Normal file
1
pkg/probo/coredata/migrations/20250305T111053Z.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE policies ADD COLUMN owner_id TEXT REFERENCES peoples(id) NOT NULL;
|
||||
@@ -16,6 +16,7 @@ type (
|
||||
Policy struct {
|
||||
ID gid.GID `db:"id"`
|
||||
OrganizationID gid.GID `db:"organization_id"`
|
||||
OwnerID gid.GID `db:"owner_id"`
|
||||
Status PolicyStatus `db:"status"`
|
||||
Name string `db:"name"`
|
||||
Content string `db:"content"`
|
||||
@@ -33,6 +34,7 @@ type (
|
||||
Content *string
|
||||
Status *PolicyStatus
|
||||
ReviewDate **time.Time
|
||||
OwnerID *gid.GID
|
||||
}
|
||||
)
|
||||
|
||||
@@ -50,6 +52,7 @@ func (p *Policy) LoadByID(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_id,
|
||||
name,
|
||||
status,
|
||||
content,
|
||||
@@ -96,6 +99,7 @@ func (p *Policies) LoadByOrganizationID(
|
||||
SELECT
|
||||
id,
|
||||
organization_id,
|
||||
owner_id,
|
||||
name,
|
||||
status,
|
||||
content,
|
||||
@@ -141,6 +145,7 @@ INSERT INTO
|
||||
policies (
|
||||
id,
|
||||
organization_id,
|
||||
owner_id,
|
||||
name,
|
||||
status,
|
||||
content,
|
||||
@@ -152,6 +157,7 @@ INSERT INTO
|
||||
VALUES (
|
||||
@policy_id,
|
||||
@organization_id,
|
||||
@owner_id,
|
||||
@name,
|
||||
@status,
|
||||
@content,
|
||||
@@ -165,6 +171,7 @@ VALUES (
|
||||
args := pgx.StrictNamedArgs{
|
||||
"policy_id": p.ID,
|
||||
"organization_id": p.OrganizationID,
|
||||
"owner_id": p.OwnerID,
|
||||
"name": p.Name,
|
||||
"status": p.Status,
|
||||
"content": p.Content,
|
||||
@@ -207,6 +214,7 @@ UPDATE policies SET
|
||||
status = COALESCE(@status, status),
|
||||
content = COALESCE(@content, content),
|
||||
review_date = COALESCE(@review_date, review_date),
|
||||
owner_id = COALESCE(@owner_id, owner_id),
|
||||
updated_at = @updated_at,
|
||||
version = version + 1
|
||||
WHERE %s
|
||||
@@ -215,6 +223,7 @@ WHERE %s
|
||||
RETURNING
|
||||
id,
|
||||
organization_id,
|
||||
owner_id,
|
||||
name,
|
||||
content,
|
||||
review_date,
|
||||
@@ -243,6 +252,9 @@ RETURNING
|
||||
if params.ReviewDate != nil {
|
||||
args["review_date"] = *params.ReviewDate
|
||||
}
|
||||
if params.OwnerID != nil {
|
||||
args["owner_id"] = *params.OwnerID
|
||||
}
|
||||
|
||||
maps.Copy(args, scope.SQLArguments())
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ type (
|
||||
Status coredata.PolicyStatus
|
||||
Content string
|
||||
ReviewDate *time.Time
|
||||
OwnerID gid.GID
|
||||
}
|
||||
|
||||
UpdatePolicyRequest struct {
|
||||
@@ -31,6 +32,7 @@ type (
|
||||
Content *string
|
||||
Status *coredata.PolicyStatus
|
||||
ReviewDate *time.Time
|
||||
OwnerID *gid.GID
|
||||
}
|
||||
)
|
||||
|
||||
@@ -68,6 +70,7 @@ func (s *PolicyService) Create(
|
||||
policy := &coredata.Policy{
|
||||
ID: policyID,
|
||||
OrganizationID: req.OrganizationID,
|
||||
OwnerID: req.OwnerID,
|
||||
Name: req.Name,
|
||||
Content: req.Content,
|
||||
Status: req.Status,
|
||||
@@ -108,6 +111,7 @@ func (s *PolicyService) Update(
|
||||
Content: req.Content,
|
||||
Status: req.Status,
|
||||
ReviewDate: &req.ReviewDate,
|
||||
OwnerID: req.OwnerID,
|
||||
}
|
||||
|
||||
policy := &coredata.Policy{ID: req.ID}
|
||||
|
||||
Reference in New Issue
Block a user