Collapse/expand parent group, previously not-visible subgroups now visible
Summary
In the groups dashboard, there's a case where collapsing and then re-expanding a parent group will cause it to show new subgroups that were not visible, before.
Steps to reproduce
I found two ways to repro:
Repro case one
- User1 creates group named "ParentGroup"
- In ParentGroup, User1 creates subgroup named "NormalSubGroup"
- In ParentGroup, User1 creates subgroup named "SubGroupChangeOwner"
- In SubGroupChangeOwner, User1 adds User2 as an Owner.
- In SubGroupChangeOwner, User1 leaves the group (via "Leave" button in Members page)
- User1 goes to the Groups dashboard (hamburger menu > Groups)
- User1 does not see SubGroupChangeOwner under ParentGroup
- User1 collapses and then re-expands ParentGroup.
- User1 now sees SubGroupChangeOwner under ParentGroup, even though they left the group.
Repro case two (does not require changing ownership)
- User1 is a member of ParentGroup
- Root (admin) user creates a subgroup of ParentGroup, named "Subgroup"
- User1 goes to the Groups dashboard (hamburger menu > Groups)
- User1 does not see Subgroup under ParentGroup
- User1 collapses and then re-expands ParentGroup.
- User1 now sees Subgroup under ParentGroup.
What is the current bug behavior?
Repro case one: In step 6, User1 sees SubGroupChangeOwner under ParentGroup after refresh.
Repro case two: In step 3, User1 does not see Subgroup (even though User1 is a member of ParentGroup)
What is the expected correct behavior?
Repro case one: In step 6, User1 should not see SubGroupChangeOwner under ParentGroup (because User1 left the group).
Repro case two: In step 3, User1 should see Subgroup (because User1 is a member of ParentGroup)
Relevant logs and/or screenshots
Here's a video showing how SubGroupChangeOwner isn't visible until after collapsing and re-expanding ParentGroup:
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Current User: git Using RVM: no Ruby Version: 2.3.3p222 Gem Version: 2.6.6 Bundler Version:1.13.7 Rake Version: 12.0.0 Redis Version: 3.2.5 Git Version: 2.13.5 Sidekiq Version:5.0.4 Go Version: unknownGitLab information Version: 9.5.1 Revision: c47ae37 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://server.company.com HTTP Clone URL: http://server.company.com/some-group/some-project.git SSH Clone URL: git@server.company.com:some-group/some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 5.8.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...GitLab Shell version >= 5.8.0 ? ... OK (5.8.0) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 38/10 ... ok 14/15 ... ok 14/16 ... ok 41/18 ... ok 39/19 ... ok 39/20 ... ok 39/21 ... ok 39/22 ... ok 39/23 ... ok 19/24 ... ok 19/25 ... ok 19/26 ... ok 19/27 ... ok 12/28 ... ok 19/33 ... repository is empty 21/36 ... ok 38/37 ... ok 14/39 ... ok 34/40 ... ok 11/41 ... ok 19/42 ... ok 12/43 ... ok 19/44 ... ok 25/45 ... ok 11/47 ... repository is empty 42/48 ... repository is empty 19/49 ... ok 19/50 ... ok 14/51 ... ok 14/52 ... ok 14/53 ... ok 14/54 ... ok 41/56 ... ok 19/57 ... ok 19/58 ... ok 14/59 ... ok 38/60 ... ok 19/61 ... ok 19/62 ... ok 28/64 ... ok 14/65 ... ok 14/66 ... ok 14/68 ... ok 14/69 ... ok 14/70 ... ok 11/71 ... ok 40/72 ... ok 14/74 ... ok 19/77 ... ok 19/78 ... ok 38/79 ... ok 11/81 ... ok 38/82 ... ok 11/83 ... repository is empty 21/84 ... ok 14/87 ... ok 19/90 ... ok 34/91 ... ok 38/92 ... ok 34/93 ... ok 11/94 ... repository is empty 34/95 ... ok 38/98 ... ok 19/100 ... ok 38/102 ... ok 19/103 ... ok 38/104 ... ok 12/105 ... ok 38/106 ... ok 38/107 ... ok 41/108 ... ok 19/110 ... ok 38/111 ... repository is empty 38/112 ... repository is empty 19/118 ... ok 38/119 ... repository is empty 12/122 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Access to /var/opt/gitlab/.ssh/authorized_keys: OK Send ping to redis server: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ... [redacted, we are using LDAP for user logins]
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 38/10 ... yes 14/15 ... yes 14/16 ... yes 41/18 ... yes 39/19 ... yes 39/20 ... yes 39/21 ... yes 39/22 ... yes 39/23 ... yes 19/24 ... yes 19/25 ... yes 19/26 ... yes 19/27 ... yes 12/28 ... yes 19/33 ... yes 21/36 ... yes 38/37 ... yes 14/39 ... yes 34/40 ... yes 11/41 ... yes 19/42 ... yes 12/43 ... yes 19/44 ... yes 25/45 ... yes 11/47 ... yes 42/48 ... yes 19/49 ... yes 19/50 ... yes 14/51 ... yes 14/52 ... yes 14/53 ... yes 14/54 ... yes 41/56 ... yes 19/57 ... yes 19/58 ... yes 14/59 ... yes 38/60 ... yes 19/61 ... yes 19/62 ... yes 28/64 ... yes 14/65 ... yes 14/66 ... yes 14/68 ... yes 14/69 ... yes 14/70 ... yes 11/71 ... yes 40/72 ... yes 14/74 ... yes 19/77 ... yes 19/78 ... yes 38/79 ... yes 11/81 ... yes 38/82 ... yes 11/83 ... yes 21/84 ... yes 14/87 ... yes 19/90 ... yes 34/91 ... yes 38/92 ... yes 34/93 ... yes 11/94 ... yes 34/95 ... yes 38/98 ... yes 19/100 ... yes 38/102 ... yes 19/103 ... yes 38/104 ... yes 12/105 ... yes 38/106 ... yes 38/107 ... yes 41/108 ... yes 19/110 ... yes 38/111 ... yes 38/112 ... yes 19/118 ... yes 38/119 ... yes 12/122 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.3) Git version >= 2.7.3 ? ... yes (2.13.5) Active users: ... 12
Checking GitLab ... Finished