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: always assign the admin role to the default admin #8897

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

micbar
Copy link
Contributor

@micbar micbar commented Apr 18, 2024

Description

Bugfix: Update the admin user role assignment to enforce the config

The admin user role assigment was not updated after the first assignment. We now read the assigned role during init and update the admin user ID accordingly if the role is not assigned.
This is especially needed when the OCIS_ADMIN_USER_ID is set after the autoprovisioning of the admin user when it originates from an external Identity Provider.

Related Issue

Motivation and Context

How Has This Been Tested?

  • manually
  • unit tests

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Copy link

update-docs bot commented Apr 18, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@micbar micbar force-pushed the fix-role-assignments branch from aaa090e to 70443e4 Compare April 19, 2024 07:56
@micbar micbar force-pushed the fix-role-assignments branch from 70443e4 to ad29d7d Compare April 19, 2024 08:08
@micbar micbar marked this pull request as ready for review April 19, 2024 08:09
@micbar micbar requested a review from kulmann as a code owner April 19, 2024 08:09
@micbar micbar requested review from kobergj and rhafer April 19, 2024 08:10
@micbar micbar force-pushed the fix-role-assignments branch from 6143a73 to 4960f8c Compare April 19, 2024 09:22
Copy link

@micbar
Copy link
Contributor Author

micbar commented Apr 19, 2024

waiting for @rhafer s feedback

@micbar micbar merged commit 648a3fc into master Apr 19, 2024
4 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix-role-assignments branch April 19, 2024 12:44
ownclouders pushed a commit that referenced this pull request Apr 19, 2024
fix: always assign the admin role to the default admin
@micbar micbar mentioned this pull request Jun 19, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OCIS_ADMIN_USER_ID is not updated when a role is already present
2 participants