Project

General

Profile

Actions

Feature #21684

closed

Add a task for checking integrity of usergroup membership

Added by Kavita Gaikwad about 7 years ago. Updated 10 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 10 months ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF