changed role permission
This commit is contained in:
1 parent
f0ecf23879
commit
323e131216
74 files changed
+2915
-4713
No files matched your search
@@ -7,6 +7,7 @@ import (
|
||||
"online-back/internal/appresult"
|
||||
"online-back/internal/handlers"
|
||||
"online-back/internal/identity/rbac"
|
||||
"online-back/internal/identity/rbac/perm"
|
||||
"online-back/internal/shared"
|
||||
"online-back/pkg/logging"
|
||||
|
||||
@@ -26,16 +27,14 @@ func NewHandler(logger *logging.Logger, repository Repository) handlers.Handler
|
||||
}
|
||||
|
||||
func (h *handler) Register(router *gin.RouterGroup) {
|
||||
group := router.Group(baseURL, appresult.JwtTokenCheck())
|
||||
group := rbac.Group(router, baseURL, rbac.Require(perm.Cards))
|
||||
group.GET("/:id/quote", h.quote)
|
||||
group.POST("/:id/pay", h.pay)
|
||||
group.GET("/:id/status", h.status)
|
||||
|
||||
// callback is hit by the customer's/operator's browser after GBÜS
|
||||
// redirects back - it carries no Bearer token, so it's registered on
|
||||
// its own group with no JwtTokenCheck. See rbac.isPublicAdminPath,
|
||||
// which must also list this path.
|
||||
router.Group(baseURL).GET("/callback", h.callback)
|
||||
// redirects back - it carries no Bearer token.
|
||||
rbac.Group(router, baseURL+"/callback", rbac.Public()).GET("", h.callback)
|
||||
}
|
||||
|
||||
// quote godoc
|
||||
|
||||
Reference in new issue
Block a user