Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group admins cannot see disabled users #4789

Closed
michag86 opened this issue May 10, 2017 · 4 comments
Closed

Group admins cannot see disabled users #4789

michag86 opened this issue May 10, 2017 · 4 comments

Comments

@michag86
Copy link
Contributor

Steps to reproduce

  1. Create user ray and paul
  2. create group marketing
  3. assign paul to group marketing
  4. make ray to group admin of marketing
  5. login as ray and go to user management
  6. disable paul
  7. Click on Disabled to list the disabled users

Expected behaviour

ray should appear under disabled

Actual behaviour

ray does not appear under disabled (empty response)

Server configuration

Nextcloud version: 12 beta 2
Updated from an older Nextcloud/ownCloud or fresh install: update from 12 beta 1

Nextcloud log (data/nextcloud.log)

no errors logged

Browser log

/index.php/settings/users/users?offset=0&limit=50&gid=_disabledUsers&pattern=
HTTP Code 200
Empty response
@michag86 michag86 changed the title Group admins cannot see disabled users [12 beta 2] Group admins cannot see disabled users May 10, 2017
@benediktg
Copy link
Member

I can reproduce this (I also have NC 12 beta 2) but if I add ray to the admin group then ray can see paul in "deactivated".

Maybe this is not a bug but a feature?
cc @MorrisJobke

@MorrisJobke
Copy link
Member

Maybe this is not a bug but a feature?
cc @MorrisJobke

Looks like bug.

cc @blizzz @nickvergessen

@MorrisJobke MorrisJobke changed the title [12 beta 2] Group admins cannot see disabled users Group admins cannot see disabled users May 11, 2017
@blizzz blizzz added this to the Nextcloud 12.0 milestone May 15, 2017
@michag86 michag86 marked this as a duplicate of #5600 Jul 28, 2017
@Neraste
Copy link
Contributor

Neraste commented Nov 26, 2017

Is there any progress about this issue? I experience the same problem…

@Neraste
Copy link
Contributor

Neraste commented Nov 26, 2017

It seems that this is due to the way settings/Controller/UsersController.php works.

Disabled users are listed using a fake _disabledUsers group, even if they are actually member of a real group. When you're not a super admin, the index method calls the displayNamesInGroup method with _disabledUsers as argument, which returns an empty array, because there is no such a group.

I have tested a quick solution where listing disabled users lists all disabled users for the groups the current user is sub admin of (line 342). It works as expected. What remains is the counter for groups with disabled users, as it count them as well. I will propose a PR as soon as possible.

LukasReschke added a commit that referenced this issue Nov 27, 2017
Fix #4789: Group admins cannot see disabled users
blizzz pushed a commit that referenced this issue Jan 23, 2018
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
MorrisJobke added a commit that referenced this issue Jan 24, 2018
[stable12] Fix #4789: Group admins cannot see disabled users
@MorrisJobke MorrisJobke mentioned this issue Mar 9, 2018
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants