~sircmpwn/core-go

453dcaefd647136c35550d1e5286f4ab366e02bf — Simon Ser 5 months ago 53966da
server/directives: disambiguate AnonInternal error message

AUTH_INTERNAL won't work with AnonInternal.
1 files changed, 1 insertions(+), 1 deletions(-)

M server/directives.go
M server/directives.go => server/directives.go +1 -1
@@ 13,7 13,7 @@ func AnonInternal(ctx context.Context, obj interface{},
	next graphql.Resolver) (interface{}, error) {

	if auth.ForContext(ctx).AuthMethod != auth.AUTH_ANON_INTERNAL {
		return nil, fmt.Errorf("Internal auth access denied")
		return nil, fmt.Errorf("Anonymous internal auth access denied")
	}

	return next(ctx)