MCPcopy
hub / github.com/harness/harness / Forbidden

Function Forbidden

app/api/render/render_error.go:42–44  ·  view source on GitHub ↗

Forbidden writes the json-encoded message for a forbidden error.

(ctx context.Context, w http.ResponseWriter)

Source from the content-addressed store, hash-verified

40
41// Forbidden writes the json-encoded message for a forbidden error.
42func Forbidden(ctx context.Context, w http.ResponseWriter) {
43 UserError(ctx, w, usererror.ErrForbidden)
44}
45
46// Forbiddenf writes the json-encoded message with a forbidden error.
47func Forbiddenf(ctx context.Context, w http.ResponseWriter, format string, args ...interface{}) {

Callers 3

RestrictToFunction · 0.92
RestrictToAdminFunction · 0.92
TestWriteForbiddenFunction · 0.70

Calls 1

UserErrorFunction · 0.85

Tested by 1

TestWriteForbiddenFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…