Bug #20316

unable to delete user. leads to foreign key violation

Added by Christian Meißner 4 months ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Ohad Levy
Category:Users
Target version:-
Difficulty: Bugzilla link:
Found in release:1.15.0 Pull request:https://github.com/theforeman/foreman/pull/4741
Story points-
Velocity based estimate-
Release1.15.4Release relationshipAuto

Description

I try to delete a user account from foreman. But I get a foreign key violation error.

Oops, we're sorry but something went wrong ERROR: update or delete on table "users" violates foreign key constraint "fk_rails_51975e21a8" on table "notification_recipients" DETAIL: Key (id)=(16) is still referenced from table "notification_recipients".

Attached you can find the log corresponding with the error.

May a useful information is that the user data comes from a active directory database.

user_delete.err (17.6 KB) Christian Meißner, 07/17/2017 07:45 AM


Related issues

Related to Foreman - Bug #20899: Unable to delete default admin user Duplicate 09/12/2017
Related to Foreman - Bug #19657: Cannot delete administrator user account: update or delet... Duplicate 05/24/2017

Associated revisions

Revision ac4efbd1
Added by Ohad Levy 3 months ago

fixes #20316 - allow to delete a user that has notifications

Revision a6921a69
Added by Ohad Levy 2 months ago

fixes #20316 - allow to delete a user that has notifications

(cherry picked from commit ac4efbd1f26040141f83b864adbb60139d7ddcb4)

History

#1 Updated by Ivan Necas 4 months ago

  • Project changed from Foreman Maintain to Foreman
  • Category set to Users

#2 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Ohad Levy
  • Pull request https://github.com/theforeman/foreman/pull/4741 added

#3 Updated by Ohad Levy 3 months ago

  • Release set to 1.15.4

#4 Updated by Ohad Levy 3 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Marek Hulán 2 months ago

  • Related to Bug #20899: Unable to delete default admin user added

#6 Updated by Marek Hulán 2 months ago

  • Related to Bug #19657: Cannot delete administrator user account: update or delete on table "users" violates foreign key constraint added

Also available in: Atom PDF