コード例 #1
0
ファイル: ModelTest.cs プロジェクト: waodng/Casbin.NET
        public void TestKeyMatch2Model()
        {
            var e = new Enforcer(_testModelFixture.GetNewKeyMatch2TestModel());

            TestEnforce(e, "alice", "/alice_data", "GET", false);
            TestEnforce(e, "alice", "/alice_data/resource1", "GET", true);
            TestEnforce(e, "alice", "/alice_data2/myid", "GET", false);
            TestEnforce(e, "alice", "/alice_data2/myid/using/res_id", "GET", true);
        }