User does not loose group ownership if they sync LDAP group they do not belong to.

Summary

(Summarize the bug encountered concisely)

Per LDAP synchronizations page: "If you select an LDAP group you do not belong to you will lose ownership of "

This does not happen.

Steps to reproduce

(How one can reproduce the issue - this is very important)

  1. Login to Gitlab with any LDAP user.
  2. Create a new group
  3. Go to Settings > LDAP synchronizations and create a synchronization using "LDAP Group cn" OR "LDAP user filter" method
  4. Go to Members page and click "Sync now".

The user does not loose ownership.

What is the current bug behavior?

The user does not loose group ownership.

What is the expected correct behavior?

The user should have lost group ownership. However, I am not sure if the user should still remain a member of the group.

Relevant logs and/or screenshots

Screenshot_2018-11-06_12.29.39

Screenshot_2018-11-06_12.30.36

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:
Proxy:		rvm_proxy:
Current User:	sanadliaquat
Using RVM:	yes
RVM Version:	1.29.4
Ruby Version:	2.4.5p335
Gem Version:	2.7.7
Bundler Version:1.17.1
Rake Version:	12.3.1
Redis Version:	4.0.11
Git Version:	2.18.0
Sidekiq Version:5.2.1
Go Version:	go1.10.3 darwin/amd64

GitLab information Version: 11.5.0-pre Revision: 1320b5b2329 Directory: /Users/sanadliaquat/work/gitlab/gdk-ee/gitlab DB Adapter: postgresql DB Version: 9.6.10 URL: http://localhost:3001 HTTP Clone URL: http://localhost:3001/some-group/some-project.git SSH Clone URL: ssh://sanadliaquat@localhost:2222/some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 8.4.1 Repository storage paths:

  • default: /Users/sanadliaquat/work/gitlab/gdk-ee/repositories Hooks: /Users/sanadliaquat/work/gitlab/gdk-ee/gitlab-shell/hooks Git: /usr/local/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

Checking GitLab Shell ...

GitLab Shell version >= 8.4.1 ? ... OK (8.4.1) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by sanadliaquat:root, or sanadliaquat:sanadliaquat? default... no User id for sanadliaquat: 501. Groupd id for root: group root doesn't exist Try fixing it: sudo chown -R sanadliaquat:root /Users/sanadliaquat/work/gitlab/gdk-ee/repositories For more information see: doc/install/installation.md in section "GitLab Shell" Please fix the error above and rerun the checks. Repo paths access is drwxrws---? default... no Try fixing it: sudo chmod -R ug+rwX,o-rwx /Users/sanadliaquat/work/gitlab/gdk-ee/repositories sudo chmod -R ug-s /Users/sanadliaquat/work/gitlab/gdk-ee/repositories sudo find /Users/sanadliaquat/work/gitlab/gdk-ee/repositories -type d -print0 | sudo xargs -0 chmod g+s For more information see: doc/install/installation.md in section "GitLab Shell" Please fix the error above and rerun the checks. hooks directories in repos are links: ... 2/1 ... ok 2/2 ... ok 3/3 ... ok 4/4 ... ok 5/5 ... ok 6/6 ... ok 6/7 ... ok 7/8 ... ok 56/9 ... repository is empty 56/10 ... repository is empty 56/11 ... repository is empty 56/12 ... repository is empty 56/13 ... repository is empty 59/14 ... ok 59/15 ... ok 58/16 ... ok 58/17 ... ok 62/18 ... repository is empty 65/19 ... repository is empty 66/20 ... repository is empty 67/21 ... repository is empty 72/31 ... repository is empty 72/32 ... repository is empty 73/33 ... repository is empty 73/34 ... repository is empty 76/36 ... repository is empty 76/37 ... repository is empty 77/38 ... repository is empty 77/39 ... repository is empty 79/40 ... repository is empty 79/41 ... repository is empty 80/42 ... repository is empty 80/43 ... repository is empty 81/44 ... repository is empty 81/45 ... repository is empty 82/46 ... repository is empty 82/47 ... repository is empty 84/48 ... repository is empty 85/49 ... repository is empty 85/50 ... repository is empty 86/51 ... repository is empty 86/52 ... repository is empty 87/53 ... repository is empty 87/54 ... repository is empty 88/55 ... repository is empty 88/56 ... repository is empty 89/57 ... repository is empty 89/58 ... repository is empty 90/59 ... repository is empty 90/60 ... repository is empty 101/61 ... ok 123/64 ... ok Running /Users/sanadliaquat/work/gitlab/gdk-ee/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /Users/sanadliaquat/work/gitlab/gdk-ee/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml Checking LDAP ...

Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) DN: uid=hruser1,ou=people,ou=global groups,dc=example,dc=org uid: hruser1 DN: uid=hruser2,ou=people,ou=global groups,dc=example,dc=org uid: hruser2 DN: uid=hruser3,ou=people,ou=global groups,dc=example,dc=org uid: hruser3 DN: uid=enguser1,ou=people,ou=global groups,dc=example,dc=org uid: enguser1 DN: uid=enguser2,ou=people,ou=global groups,dc=example,dc=org uid: enguser2 DN: uid=enguser3,ou=people,ou=global groups,dc=example,dc=org uid: enguser3 DN: uid=securityuser1,ou=people,ou=global groups,dc=example,dc=org uid: securityuser1 DN: uid=securityuser2,ou=people,ou=global groups,dc=example,dc=org uid: securityuser2 DN: uid=securityuser3,ou=people,ou=global groups,dc=example,dc=org uid: securityuser3 DN: uid=adminuser1,ou=people,ou=global groups,dc=example,dc=org uid: adminuser1 DN: uid=adminuser2,ou=people,ou=global groups,dc=example,dc=org uid: adminuser2 DN: uid=adminuser3,ou=people,ou=global groups,dc=example,dc=org uid: adminuser3 DN: uid=tanuki,dc=example,dc=org uid: tanuki

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? ... no Try fixing it: sudo chmod 700 /Users/sanadliaquat/work/gitlab/gdk-ee/gitlab/public/uploads For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. Uploads directory tmp has correct permissions? ... yes Init script exists? ... no Try fixing it: Install the init script For more information see: doc/install/installation.md in section "Install Init Script" Please fix the error above and rerun the checks. Init script up-to-date? ... can't check because of previous errors Projects have namespace: ... 2/1 ... yes 2/2 ... yes 3/3 ... yes 4/4 ... yes 5/5 ... yes 6/6 ... yes 6/7 ... yes 7/8 ... yes 56/9 ... yes 56/10 ... yes 56/11 ... yes 56/12 ... yes 56/13 ... yes 59/14 ... yes 59/15 ... yes 58/16 ... yes 58/17 ... yes 62/18 ... yes 65/19 ... yes 66/20 ... yes 67/21 ... yes 72/31 ... yes 72/32 ... yes 73/33 ... yes 73/34 ... yes 76/36 ... yes 76/37 ... yes 77/38 ... yes 77/39 ... yes 79/40 ... yes 79/41 ... yes 80/42 ... yes 80/43 ... yes 81/44 ... yes 81/45 ... yes 82/46 ... yes 82/47 ... yes 84/48 ... yes 85/49 ... yes 85/50 ... yes 86/51 ... yes 86/52 ... yes 87/53 ... yes 87/54 ... yes 88/55 ... yes 88/56 ... yes 89/57 ... yes 89/58 ... yes 90/59 ... yes 90/60 ... yes 101/61 ... yes 123/64 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.5) Git version >= 2.9.5 ? ... yes (2.18.0) Git user has default SSH configuration? ... no Try fixing it: mkdir ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/id_boot2docker ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/id_rsa_gl.pub ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/config ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/id_rsa ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/github_new_rsa ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/id_rsa.pub ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/id_rsa_gl ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/github_rsa ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/github_rsa.pub ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/id_boot2docker.pub ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/bitb_rsa.pub ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/bitb_rsa ~/gitlab-check-backup-1541490468 sudo mv /Users/sanadliaquat/.ssh/github_new_rsa.pub ~/gitlab-check-backup-1541490468 For more information see: doc/ssh/README.md in section "SSH on the GitLab server" Please fix the error above and rerun the checks. Active users: ... 61 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)

Checking GitLab ... Finished

Assignee Loading
Time tracking Loading