Skip to content

Commit 2369b59

Browse files
committed
添加权限控制继承
1 parent b9abe9b commit 2369b59

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

http/router/httprouter/subrouter.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ import (
99

1010
func newSubRouter(basePath string, root *httpRouter) *subRouter {
1111
return &subRouter{
12-
basePath: basePath,
13-
root: root,
12+
basePath: basePath,
13+
root: root,
14+
authEnable: root.authEnable,
15+
permissionEnable: root.permissionEnable,
1416
}
1517
}
1618

@@ -79,6 +81,8 @@ func (r *subRouter) ResourceRouter(resourceName string, labels ...*router.Label)
7981
basePath: r.basePath,
8082
root: r.root,
8183
labels: append(r.labels, labels...),
84+
authEnable: r.authEnable,
85+
permissionEnable: r.permissionEnable,
8286
}
8387
}
8488

0 commit comments

Comments
 (0)