1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-06 01:41:00 +00:00

Add namespace filtering

This commit is contained in:
Darren Shepherd
2020-02-27 10:34:51 -07:00
parent ae42b9422b
commit 6b6ff53373
11 changed files with 194 additions and 99 deletions

View File

@@ -24,6 +24,7 @@ var (
type ParsedURL struct {
Type string
Name string
Namespace string
Link string
Method string
Action string
@@ -80,6 +81,9 @@ func Parse(apiOp *types.APIRequest, urlParser URLParser) error {
if apiOp.URLPrefix == "" {
apiOp.URLPrefix = parsedURL.Prefix
}
if apiOp.Namespace == "" {
apiOp.Namespace = parsedURL.Namespace
}
if apiOp.URLBuilder == nil {
// make error local to not override the outer error we have yet to check