[add] dashboard widget guard
This commit is contained in:
parent
c65bc6cd17
commit
517eae1270
1 changed files with 9 additions and 7 deletions
|
|
@ -8,6 +8,7 @@ import (
|
||||||
table_v0 "github.com/yaoapp/yao/table"
|
table_v0 "github.com/yaoapp/yao/table"
|
||||||
|
|
||||||
"github.com/yaoapp/yao/widgets/chart"
|
"github.com/yaoapp/yao/widgets/chart"
|
||||||
|
"github.com/yaoapp/yao/widgets/dashboard"
|
||||||
"github.com/yaoapp/yao/widgets/form"
|
"github.com/yaoapp/yao/widgets/form"
|
||||||
"github.com/yaoapp/yao/widgets/list"
|
"github.com/yaoapp/yao/widgets/list"
|
||||||
"github.com/yaoapp/yao/widgets/table"
|
"github.com/yaoapp/yao/widgets/table"
|
||||||
|
|
@ -15,13 +16,14 @@ import (
|
||||||
|
|
||||||
// Guards middlewares
|
// Guards middlewares
|
||||||
var Guards = map[string]gin.HandlerFunc{
|
var Guards = map[string]gin.HandlerFunc{
|
||||||
"bearer-jwt": guardBearerJWT, // Bearer JWT
|
"bearer-jwt": guardBearerJWT, // Bearer JWT
|
||||||
"cross-origin": guardCrossOrigin, // Cross-Origin Resource Sharing
|
"cross-origin": guardCrossOrigin, // Cross-Origin Resource Sharing
|
||||||
"table-guard": table_v0.Guard, // Table Guard ( v0.9 table)
|
"table-guard": table_v0.Guard, // Table Guard ( v0.9 table)
|
||||||
"widget-table": table.Guard, // Widget Table Guard
|
"widget-table": table.Guard, // Widget Table Guard
|
||||||
"widget-list": list.Guard, // Widget List Guard
|
"widget-list": list.Guard, // Widget List Guard
|
||||||
"widget-form": form.Guard, // Widget Form Guard
|
"widget-form": form.Guard, // Widget Form Guard
|
||||||
"widget-chart": chart.Guard, // Widget Chart Guard
|
"widget-chart": chart.Guard, // Widget Chart Guard
|
||||||
|
"widget-dashboard": dashboard.Guard, // Widget Dashboard Guard
|
||||||
}
|
}
|
||||||
|
|
||||||
// JWT Bearer JWT
|
// JWT Bearer JWT
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue