MCPcopy Index your code
hub / github.com/apache/casbin / EnableAcceptJsonRequest

Method EnableAcceptJsonRequest

enforcer.go:636–638  ·  view source on GitHub ↗

EnableAcceptJsonRequest controls whether to accept json as a request parameter.

(acceptJsonRequest bool)

Source from the content-addressed store, hash-verified

634
635// EnableAcceptJsonRequest controls whether to accept json as a request parameter.
636func (e *Enforcer) EnableAcceptJsonRequest(acceptJsonRequest bool) {
637 e.acceptJsonRequest = acceptJsonRequest
638}
639
640// BuildRoleLinks manually rebuild the role inheritance relations.
641func (e *Enforcer) BuildRoleLinks() error {

Callers 3

TestABACTypesFunction · 0.95
TestABACJsonRequestFunction · 0.95
TestInvalidJsonRequestFunction · 0.95

Calls

no outgoing calls

Tested by 3

TestABACTypesFunction · 0.76
TestABACJsonRequestFunction · 0.76
TestInvalidJsonRequestFunction · 0.76