fix: blueprint overwrites sso-users and sso-roles when empty arrays provided #173

Closed
opened 2026-04-05 17:02:00 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Fizza-Mukhtar on 3/1/2026

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Fixes #2197

Problem

When a blueprint defines sso-enabled and auto-login-idp but omits sso-users and sso-roles, the sync functions were being called with empty arrays, causing all existing users and roles to be cleared on every redeploy.

Fix

Added .length > 0 check before calling syncRoleResources and syncUserResources, consistent with how whitelist-users was already handled.

*Originally created by @Fizza-Mukhtar on 3/1/2026* ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. Fixes #2197 ## Problem When a blueprint defines `sso-enabled` and `auto-login-idp` but omits `sso-users` and `sso-roles`, the sync functions were being called with empty arrays, causing all existing users and roles to be cleared on every redeploy. ## Fix Added `.length > 0` check before calling `syncRoleResources` and `syncUserResources`, consistent with how `whitelist-users` was already handled.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#173