using new organization
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
// Package authz provides handlers to enable ACL, RBAC, ABAC authorization support.
|
||||
// Simple Usage:
|
||||
// import(
|
||||
// "github.com/astaxie/beego"
|
||||
// "github.com/astaxie/beego/plugins/authz"
|
||||
// "github.com/beego/beego"
|
||||
// "github.com/beego/beego/plugins/authz"
|
||||
// "github.com/casbin/casbin"
|
||||
// )
|
||||
//
|
||||
@@ -44,10 +44,10 @@ import (
|
||||
|
||||
"github.com/casbin/casbin"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
beecontext "github.com/astaxie/beego/server/web/context"
|
||||
"github.com/astaxie/beego/server/web/filter/authz"
|
||||
beego "github.com/beego/beego/adapter"
|
||||
"github.com/beego/beego/adapter/context"
|
||||
beecontext "github.com/beego/beego/server/web/context"
|
||||
"github.com/beego/beego/server/web/filter/authz"
|
||||
)
|
||||
|
||||
// NewAuthorizer returns the authorizer.
|
||||
|
||||
@@ -11,4 +11,4 @@ g = _, _
|
||||
e = some(where (p.eft == allow))
|
||||
|
||||
[matchers]
|
||||
m = g(r.sub, p.sub) && keyMatch(r.obj, p.obj) && (r.act == p.act || p.act == "*")
|
||||
m = g(r.sub, p.sub) && keyMatch(r.obj, p.obj) && (r.act == p.act || p.act == "*")
|
||||
|
||||
@@ -4,4 +4,4 @@ p, bob, /dataset2/resource1, *
|
||||
p, bob, /dataset2/resource2, GET
|
||||
p, bob, /dataset2/folder1/*, POST
|
||||
p, dataset1_admin, /dataset1/*, *
|
||||
g, cathy, dataset1_admin
|
||||
g, cathy, dataset1_admin
|
||||
|
||||
|
@@ -19,9 +19,9 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
beego "github.com/astaxie/beego/adapter"
|
||||
"github.com/astaxie/beego/adapter/context"
|
||||
"github.com/astaxie/beego/adapter/plugins/auth"
|
||||
beego "github.com/beego/beego/adapter"
|
||||
"github.com/beego/beego/adapter/context"
|
||||
"github.com/beego/beego/adapter/plugins/auth"
|
||||
"github.com/casbin/casbin"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user