Skip to content

Group picker shows incomplete list of groups (limit:20 hardcoded in OCS call) #6

Description

@s0lczi

Bug

The group picker dropdowns in admin settings (link visibility filter and group
assignment) only show up to 20 groups, regardless of how many groups exist in
the Nextcloud instance. Instances with more than 20 groups cannot access all
groups through the UI.

Root cause

Two issues found:

1 (Potential). lib/Controller/LinkController.phpgetGroups() method

$this->groupManager->search('') is called without an explicit limit parameter.
Nextcloud's IGroupManager::search() defaults to $limit = 15, so the admin
groups endpoint returns at most 15 groups.

Fix: $this->groupManager->search('', -1)

2 (Proven). Compiled frontend — OCS groups call

The group picker component queries /ocs/v2.php/cloud/groups/details with
limit:20 hardcoded and no pagination or infinite scroll. This caps the
dropdown at 20 groups even when the backend returns more.

Fix: increase limit or implement search-as-you-type with a reasonable cap
(e.g. 500).

Steps to reproduce

  1. Create more than 20 groups in Nextcloud
  2. Open DashLink admin settings
  3. Open any group picker dropdown — only the first 20 groups appear alphabetically

Environment

  • Nextcloud: 33.0.2.2
  • DashLink: 1.2.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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