--- a/access/enforcer.go Wed Sep 11 23:28:54 2019 -0500
+++ b/access/enforcer.go Wed Sep 11 23:29:12 2019 -0500
@@ -13,26 +13,6 @@
-func accessMatch(key1, key2 string) bool {
- return key1 == "init" || key1 == "write" || key1 == "read"
- return key1 == "write" || key1 == "read"
-func accessMatchFunc(args ...interface{}) (interface{}, error) {
- key1 := args[0].(string)
- key2 := args[1].(string)
- return (bool)(accessMatch(key1, key2)), nil
func refreshEnforcer(adminRepoPath string) error {
defer enforcerLock.Unlock()
@@ -45,8 +25,6 @@
e := casbin.NewEnforcer(modelFile, policyFile)
- e.AddFunction("access", accessMatchFunc)