MCPcopy Create free account
hub / github.com/Permify/permify / allowed

Function allowed

internal/engines/check.go:894–899  ·  view source on GitHub ↗

allowed is a helper function that returns an allowed PermissionCheckResponse with the provided PermissionCheckResponseMetadata. The function works as follows: 1. The function takes a PermissionCheckResponseMetadata as input parameter. 2. The function returns an allowed PermissionCheckResponse with

(meta *base.PermissionCheckResponseMetadata)

Source from the content-addressed store, hash-verified

892// 1. The function takes a PermissionCheckResponseMetadata as input parameter.
893// 2. The function returns an allowed PermissionCheckResponse with a RESULT_ALLOWED Can value and the provided metadata.
894func allowed(meta *base.PermissionCheckResponseMetadata) *base.PermissionCheckResponse {
895 return &base.PermissionCheckResponse{
896 Can: base.CheckResult_CHECK_RESULT_ALLOWED,
897 Metadata: meta,
898 }
899}
900
901// emptyResponseMetadata creates and returns an empty PermissionCheckResponseMetadata.
902//

Callers 7

checkMethod · 0.85
checkDirectRelationMethod · 0.85
checkDirectAttributeMethod · 0.85
checkDirectCallMethod · 0.85
checkUnionFunction · 0.85
checkIntersectionFunction · 0.85
checkExclusionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected