Project

General

Profile

Actions

Feature #21684

closed

Add a task for checking integrity of usergroup membership

Added by Kavita Gaikwad over 6 years ago. Updated 2 months ago.

Status:
Rejected
Priority:
Normal
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Description of problem:

The usergroup membership tables (class UsergroupMember) in the foreman use polymorphic associations (either to User or Usergroup). Therefore it can't use foreign keys constraints and db integrity is ensured only by active record code and transactions.

We've experienced an issues with deleting users in past, that caused db integrity to be broken. Namely there were UsergroupMember records pointing to users that no longer existed. It's not 100% clear how that happened. It could be caused by issues with upgrade or by past bugs.

Foreman maintain should provide a check for testing whether all UsergroupMamber records point to an existant users/groups and delete those that are broken.

Adding such check also for other polymorphic relations should be considered too.

Actions #1

Updated by Eric Helms 2 months ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF