Skip to content

Fix Auth'd servers in roles | Refine server ordering

What does this MR do and why?

This resolves a very rare bug where a user's server order can have an ID deleted from the list when loading the dashboard. When that's deleted from the list our nested loop will try to delete it again causing a traceback.

This bug would occur when a user had two roles with the same servers in it (except SU). This would cause crafty to authorize them for the servers twice in turn having the servers in the list twice. Crafty would then try to delete the server from the user order list twice and crash.

This branch now checks to see if two roles have the same server and only add them to the auth list once. This branch also refines the user order setup process and cuts out a nested loop for efficiency's sake.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • Have you checked this doesn't interfere/conflict/duplicate someone elses work?
  • Have you fully tested your changes?
  • Have you resolved any lint issues?
  • Have you assigned a reviewer?
  • Have you applied correct labels?
Edited by Andrew

Merge request reports

Loading