Skip to content

Group creation flow (lastGID and empty group) #230

@jyhsu2000

Description

@jyhsu2000

Check the debugging logs
Checked. No related logs were shown.

Version
Run v1.11 with Docker Compose.

Partial of docker-compose.yml,

  lum:
    image: wheelybird/ldap-user-manager:v1.11
    environment:
      - TZ=Asia/Taipei
      - LDAP_URI=ldap://openldap:1389/
      - LDAP_BASE_DN=dc=<hidden>,dc=<hidden>
      - LDAP_ADMIN_BIND_DN=cn=<hidden>,dc=<hidden>,dc=<hidden>
      - LDAP_ADMIN_BIND_PWD=<hidden>
      - LDAP_ADMINS_GROUP=admins
      - NO_HTTPS=true
      - ORGANISATION_NAME=<hidden>
      - SITE_NAME=<hidden>
      - SHOW_POSIX_ATTRIBUTES=true
      - DEFAULT_USER_SHELL=/usr/bin/zsh
      - ACCEPT_WEAK_PASSWORDS=true
      - LDAP_DEBUG=true
      - LDAP_VERBOSE_CONNECTION_LOGS=true

Describe the bug
I noticed that there are some strange parts of the group creation flow,

gidNumber handling

Description
When I try to create a new group, once entering the group creation page, the Group ID number field is prefilled with the value of lastGID.
If I create the group with the prefilled value, its gidNumber will be duplicated with the previous group, and lastGID won't increment.
If I clear the Group ID number field, it works fine.
(gidNumber will be set to lastGID+1 and lastGID will increment as expected)

Suggestion
Remove the prefill value of Group ID number and keep it blank by default.

Create an empty group

Description
I tried to create a group with no members.
On the group creation page,
The Save button is not enabled by default before adding someone to the group.
If I add someone and move him out of the group,
The Save button is enabled, but after clicking it, some warnings and errors are shown,

Warning: Undefined array key "membership" in /opt/ldap_user_manager/account_manager/show_group.php on line 150

Warning: foreach() argument must be of type array|object, null given in /opt/ldap_user_manager/account_manager/show_group.php on line 150

Deprecated: ldap_escape(): Passing null to parameter #1 ($value) of type string is deprecated in /opt/ldap_user_manager/includes/ldap_functions.inc.php on line 588

Suggestion
Let us create empty groups.

screenshot_20240926_120223

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions