MCPcopy Index your code
hub / github.com/coder/coder / ForbiddenWithInternal

Function ForbiddenWithInternal

coderd/rbac/error.go:56–64  ·  view source on GitHub ↗

ForbiddenWithInternal creates a new error that will return a simple "forbidden" to the client, logging internally the more detailed message provided.

(internal error, subject Subject, action policy.Action, object Object, output rego.ResultSet)

Source from the content-addressed store, hash-verified

54// "forbidden" to the client, logging internally the more detailed message
55// provided.
56func ForbiddenWithInternal(internal error, subject Subject, action policy.Action, object Object, output rego.ResultSet) *UnauthorizedError {
57 return &UnauthorizedError{
58 internal: internal,
59 subject: subject,
60 action: action,
61 object: object,
62 output: output,
63 }
64}
65
66func (e UnauthorizedError) Unwrap() error {
67 return e.internal

Callers 3

authorizeMethod · 0.85
AuthorizeMethod · 0.85

Calls

no outgoing calls

Tested by 1