Skip to content

Issue with LDAP Group DN Validation in User Group Creation #157

@mahbub570

Description

@mahbub570

Working on issue usergroup #94

When creating a user group of type LDAP (group type 1) it always give me error. I can successfully create group type 2 for HTTP, 3 for OIDC.

bad request: {
  "errors": [
    {
      "code": "BAD_REQUEST",
      "message": "LDAP Group DN is not found: DN:cn:admin,ou=users,dc=example,dc=com"
    }
  ]
}

I tried :

func CreateUserGroup(groupName string, groupType int64, ldapGroupDn string) error {
    ctx, client, err := utils.ContextWithClient()
    if err != nil {
        return fmt.Errorf("failed to create client: %v", err)
    }

    userGroup := &models.UserGroup{
        GroupName: groupName,
        GroupType: groupType,
    }

    if groupType == 1 {
        userGroup.LdapGroupDn = ldapGroupDn
    }

    _, err = client.Usergroup.CreateUserGroup(ctx, &usergroup.CreateUserGroupParams{
        Usergroup: userGroup,
    })

how can i solve this issue ? @Vad1mo , @OrlinVasilev

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem rightquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions