MCPcopy
hub / github.com/apache/casbin / TestBasicModelWithoutResources

Function TestBasicModelWithoutResources

model_test.go:133–140  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

131}
132
133func TestBasicModelWithoutResources(t *testing.T) {
134 e, _ := NewEnforcer("examples/basic_without_resources_model.conf", "examples/basic_without_resources_policy.csv")
135
136 testEnforceWithoutUsers(t, e, "alice", "read", true)
137 testEnforceWithoutUsers(t, e, "alice", "write", false)
138 testEnforceWithoutUsers(t, e, "bob", "read", false)
139 testEnforceWithoutUsers(t, e, "bob", "write", true)
140}
141
142func TestRBACModel(t *testing.T) {
143 e, _ := NewEnforcer("examples/rbac_model.conf", "examples/rbac_policy.csv")

Callers

nothing calls this directly

Calls 2

NewEnforcerFunction · 0.85
testEnforceWithoutUsersFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…