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

fix(admin role): fix old and wrong way to determine whether user is admin #42706

Merged
merged 2 commits into from Feb 24, 2024

Conversation

blizzz
Copy link
Member

@blizzz blizzz commented Jan 11, 2024

  • fixes Settings knowing who is an admin of non-local group backend groups
  • obsoletes and removes a little old, deprecated code
  • double checks proper parameter type on Group\Manager::isAdmin
  • also fixes legacy OC_User code to check whether user is an admin

Summary

The settings app (and potentially others) used legacy code to determine whether a user is an admin, ignoring users of non-local groups whose backend implements Backend::IS_ADMIN.

Checklist

@blizzz
Copy link
Member Author

blizzz commented Jan 11, 2024

/backport to stable28

@blizzz blizzz added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Jan 11, 2024
@blizzz blizzz force-pushed the fix/42480/user-admin-not-admin branch from 4987393 to ed89474 Compare January 11, 2024 17:02
@blizzz blizzz added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 11, 2024
@blizzz blizzz requested review from come-nc, a team, ArtificialOwl and Altahrim and removed request for a team January 11, 2024 17:02
@blizzz blizzz requested a review from Fenn-CS January 15, 2024 16:55
…dmin

- fixes Settings knowing who is an admin of non-local group backend groups
- obsoletes and removes a little old, deprecated code
- double checks proper parameter type on Group\Manager::isAdmin
- also fixes legacy OC_User code to check whether user is an admin

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz blizzz force-pushed the fix/42480/user-admin-not-admin branch from ed89474 to c98b046 Compare February 19, 2024 17:57
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 24, 2024
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
@skjnldsv skjnldsv merged commit 0582e88 into master Feb 24, 2024
160 checks passed
@skjnldsv skjnldsv deleted the fix/42480/user-admin-not-admin branch February 24, 2024 19:11
@blizzz blizzz mentioned this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: users and groups
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Promoting an LDAP group to grant administrative rights is not sufficient in all cases
4 participants