[#1095] adm: Support user/group target for APE
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
46bc6a7930
commit
97e54066d0
2 changed files with 6 additions and 0 deletions
|
@ -16,6 +16,8 @@ import (
|
||||||
const (
|
const (
|
||||||
namespaceTarget = "namespace"
|
namespaceTarget = "namespace"
|
||||||
containerTarget = "container"
|
containerTarget = "container"
|
||||||
|
userTarget = "user"
|
||||||
|
groupTarget = "group"
|
||||||
jsonFlag = "json"
|
jsonFlag = "json"
|
||||||
jsonFlagDesc = "Output rule chains in JSON format"
|
jsonFlagDesc = "Output rule chains in JSON format"
|
||||||
chainIDFlag = "chain-id"
|
chainIDFlag = "chain-id"
|
||||||
|
|
|
@ -53,6 +53,10 @@ func parseTargetType(cmd *cobra.Command) (policyengine.TargetType, error) {
|
||||||
return policyengine.Namespace, nil
|
return policyengine.Namespace, nil
|
||||||
case containerTarget:
|
case containerTarget:
|
||||||
return policyengine.Container, nil
|
return policyengine.Container, nil
|
||||||
|
case userTarget:
|
||||||
|
return policyengine.User, nil
|
||||||
|
case groupTarget:
|
||||||
|
return policyengine.Group, nil
|
||||||
}
|
}
|
||||||
return -1, errUnknownTargetType
|
return -1, errUnknownTargetType
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue