fix(bigbluebutton): resolve CodeQL useless-assignment alerts #260 #261

Remove useless assignments to changed before the unconditional
changed = true at the password block. Also fix ||= short-circuit bug
that skipped ensure_attr! when changed was already true.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Environment TestandClaude Sonnet 4.6 committed 2026-04-13 12:11:51 +02:00
1 parent ec98dfbe46
commit db3df8ec53
1 file changed
+2 -3
@@ -50,13 +50,12 @@ if user
changed = true
end
changed ||= ensure_attr!(user, :provider, "greenlight")
changed ||= ensure_attr!(user, :language, "en")
ensure_attr!(user, :provider, "greenlight")
ensure_attr!(user, :language, "en")
if user.respond_to?(:role=) && user.respond_to?(:role_id)
if user.role_id != admin_role.id
user.role = admin_role
changed = true
end
end