Added a group addMember command
This commit is contained in:
parent
24e54d0ca5
commit
e3b036bc57
@ -16,14 +16,14 @@ import (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// define group add subcommand flags
|
// define group add subcommand flags
|
||||||
groupAddCmd.Flags().StringP("base_ou", "o", "", "LDAP OU to search for the group entry under")
|
groupAddMemberCmd.Flags().StringP("base_ou", "o", "", "LDAP OU to search for the group entry under")
|
||||||
groupAddCmd.Flags().StringP("id_attribute", "a", "cn", "LDAP DN attribute for groups")
|
groupAddMemberCmd.Flags().StringP("id_attribute", "a", "cn", "LDAP DN attribute for groups")
|
||||||
groupAddCmd.Flags().StringVarP(&flagGroupName, "group_name", "n", "", "Name for the group")
|
groupAddMemberCmd.Flags().StringVarP(&flagGroupName, "group_name", "n", "", "Name for the group")
|
||||||
groupAddCmd.Flags().StringVarP(&flagGroupType, "group_type", "t", "unix", "Type of the group")
|
groupAddMemberCmd.Flags().StringVarP(&flagGroupType, "group_type", "t", "unix", "Type of the group")
|
||||||
groupAddCmd.Flags().StringVarP(&flagGroupMembers, "group_members", "m", "", "Members to add to the group (comma-separated list)")
|
groupAddMemberCmd.Flags().StringVarP(&flagGroupMembers, "group_members", "m", "", "Members to add to the group (comma-separated list)")
|
||||||
// bind config file values to group add flags
|
// bind config file values to group add flags
|
||||||
viper.BindPFlag("group.base_ou", groupAddCmd.Flags().Lookup("base_ou"))
|
viper.BindPFlag("group.base_ou", groupAddMemberCmd.Flags().Lookup("base_ou"))
|
||||||
viper.BindPFlag("group.id_attr", groupAddCmd.Flags().Lookup("id_attribute"))
|
viper.BindPFlag("group.id_attr", groupAddMemberCmd.Flags().Lookup("id_attribute"))
|
||||||
}
|
}
|
||||||
|
|
||||||
// define group add subcommand
|
// define group add subcommand
|
||||||
|
Loading…
Reference in New Issue
Block a user