@@ -202,7 +202,6 @@ func (r *Resolver) ProboService(ctx context.Context, tenantID gid.TenantID) *pro
|
||||
return r.probo.WithTenant(tenantID)
|
||||
}
|
||||
|
||||
|
||||
func (r *Resolver) Permission(ctx context.Context, obj types.Node, action string) (bool, error) {
|
||||
return r.authorize(ctx, obj.GetID(), action) == nil, nil
|
||||
}
|
||||
|
||||
@@ -22,17 +22,17 @@ import (
|
||||
)
|
||||
|
||||
type TrustCenter struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Active bool `json:"active"`
|
||||
LogoFileURL *string `json:"logoFileUrl,omitempty"`
|
||||
DarkLogoFileURL *string `json:"darkLogoFileUrl,omitempty"`
|
||||
NdaFileName *string `json:"ndaFileName,omitempty"`
|
||||
NdaFileURL *string `json:"ndaFileUrl,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
Organization *Organization `json:"organization"`
|
||||
Accesses *TrustCenterAccessConnection `json:"accesses"`
|
||||
References *TrustCenterReferenceConnection `json:"references"`
|
||||
ID gid.GID `json:"id"`
|
||||
Active bool `json:"active"`
|
||||
LogoFileURL *string `json:"logoFileUrl,omitempty"`
|
||||
DarkLogoFileURL *string `json:"darkLogoFileUrl,omitempty"`
|
||||
NdaFileName *string `json:"ndaFileName,omitempty"`
|
||||
NdaFileURL *string `json:"ndaFileUrl,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
Organization *Organization `json:"organization"`
|
||||
Accesses *TrustCenterAccessConnection `json:"accesses"`
|
||||
References *TrustCenterReferenceConnection `json:"references"`
|
||||
ComplianceFrameworks *ComplianceFrameworkConnection `json:"complianceFrameworks"`
|
||||
ExternalUrls *ComplianceExternalURLConnection `json:"externalUrls"`
|
||||
MailingList *MailingList `json:"mailingList,omitempty"`
|
||||
|
||||
@@ -26,7 +26,7 @@ type ComplianceFramework struct {
|
||||
FrameworkID gid.GID `json:"-"`
|
||||
}
|
||||
|
||||
func (ComplianceFramework) IsNode() {}
|
||||
func (ComplianceFramework) IsNode() {}
|
||||
func (cf ComplianceFramework) GetID() gid.GID { return cf.ID }
|
||||
|
||||
type ComplianceFrameworkConnection struct {
|
||||
|
||||
@@ -42,7 +42,7 @@ func (t TracingExtension) Validate(schema graphql.ExecutableSchema) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t TracingExtension) InterceptField(ctx context.Context, next graphql.Resolver) (interface{}, error) {
|
||||
func (t TracingExtension) InterceptField(ctx context.Context, next graphql.Resolver) (any, error) {
|
||||
rootSpan := trace.SpanFromContext(ctx)
|
||||
|
||||
if rootSpan.IsRecording() {
|
||||
|
||||
@@ -57,7 +57,7 @@ func MarshalCursorKeyScalar(ck page.CursorKey) graphql.Marshaler {
|
||||
})
|
||||
}
|
||||
|
||||
func UnmarshalCursorKeyScalar(v interface{}) (page.CursorKey, error) {
|
||||
func UnmarshalCursorKeyScalar(v any) (page.CursorKey, error) {
|
||||
s, ok := v.(string)
|
||||
if !ok {
|
||||
return page.CursorKeyNil, errors.New("must be a string")
|
||||
|
||||
@@ -33,7 +33,7 @@ func MarshalGIDScalar(id gid.GID) graphql.Marshaler {
|
||||
)
|
||||
}
|
||||
|
||||
func UnmarshalGIDScalar(v interface{}) (gid.GID, error) {
|
||||
func UnmarshalGIDScalar(v any) (gid.GID, error) {
|
||||
s, ok := v.(string)
|
||||
if !ok {
|
||||
return gid.Nil, errors.New("must be a string")
|
||||
|
||||
@@ -33,7 +33,7 @@ func MarshalAddrScalar(a mail.Addr) graphql.Marshaler {
|
||||
)
|
||||
}
|
||||
|
||||
func UnmarshalAddrScalar(v interface{}) (mail.Addr, error) {
|
||||
func UnmarshalAddrScalar(v any) (mail.Addr, error) {
|
||||
s, ok := v.(string)
|
||||
if !ok {
|
||||
return mail.Nil, errors.New("must be a string")
|
||||
|
||||
Reference in New Issue
Block a user