using new organization

This commit is contained in:
Ming Deng
2020-12-13 23:09:19 +08:00
parent 093f976365
commit a70f7fc920
253 changed files with 504 additions and 503 deletions

View File

@@ -16,8 +16,8 @@
//
// Simple Usage:
// import(
// "github.com/astaxie/beego"
// "github.com/astaxie/beego/plugins/apiauth"
// "github.com/beego/beego"
// "github.com/beego/beego/plugins/apiauth"
// )
//
// func main(){
@@ -65,8 +65,8 @@ import (
"sort"
"time"
"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/context"
)
// AppIDToAppSecret gets appsecret through appid

View File

@@ -15,8 +15,8 @@
// Package auth provides handlers to enable basic auth support.
// Simple Usage:
// import(
// "github.com/astaxie/beego"
// "github.com/astaxie/beego/plugins/auth"
// "github.com/beego/beego"
// "github.com/beego/beego/plugins/auth"
// )
//
// func main(){
@@ -40,8 +40,8 @@ import (
"net/http"
"strings"
"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/context"
)
var defaultRealm = "Authorization Required"

View File

@@ -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,8 +44,8 @@ import (
"github.com/casbin/casbin"
"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/context"
)
// NewAuthorizer returns the authorizer.

View File

@@ -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 == "*")

View File

@@ -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
1 p, alice, /dataset1/*, GET
4 p, bob, /dataset2/resource2, GET
5 p, bob, /dataset2/folder1/*, POST
6 p, dataset1_admin, /dataset1/*, *
7 g, cathy, dataset1_admin

View File

@@ -21,9 +21,9 @@ import (
"github.com/casbin/casbin"
"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
"github.com/astaxie/beego/server/web/filter/auth"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/context"
"github.com/beego/beego/server/web/filter/auth"
)
func testRequest(t *testing.T, handler *web.ControllerRegister, user string, path string, method string, code int) {

View File

@@ -15,8 +15,8 @@
// Package cors provides handlers to enable CORS support.
// Usage
// import (
// "github.com/astaxie/beego"
// "github.com/astaxie/beego/plugins/cors"
// "github.com/beego/beego"
// "github.com/beego/beego/plugins/cors"
// )
//
// func main() {
@@ -42,8 +42,8 @@ import (
"strings"
"time"
"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/context"
)
const (

View File

@@ -21,8 +21,8 @@ import (
"testing"
"time"
"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/context"
)
// HTTPHeaderGuardRecorder is httptest.ResponseRecorder with own http.Header

View File

@@ -17,8 +17,8 @@ package opentracing
import (
"context"
"github.com/astaxie/beego/server/web"
beegoCtx "github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web"
beegoCtx "github.com/beego/beego/server/web/context"
logKit "github.com/go-kit/kit/log"
opentracingKit "github.com/go-kit/kit/tracing/opentracing"
"github.com/opentracing/opentracing-go"

View File

@@ -22,7 +22,7 @@ import (
"github.com/opentracing/opentracing-go"
"github.com/stretchr/testify/assert"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web/context"
)
func TestFilterChainBuilder_FilterChain(t *testing.T) {

View File

@@ -21,9 +21,9 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/astaxie/beego"
"github.com/astaxie/beego/server/web"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego"
"github.com/beego/beego/server/web"
"github.com/beego/beego/server/web/context"
)
// FilterChainBuilder is an extension point,

View File

@@ -21,7 +21,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/astaxie/beego/server/web/context"
"github.com/beego/beego/server/web/context"
)
func TestFilterChain(t *testing.T) {