Project

General

Profile

Feature #18321

Provide migration to fix cloned roles

Added by Lukas Zapletal over 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Users, Roles and Permissions
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

When role was cloned, it was created with incorrect builtin value causing issues. This was fixed in #16828 but no migration was provided to fix already cloned records:

Role.where(:builtin => nil).update_all(:builtin => 0)

Related issues

Related to Foreman - Bug #16828: Cloned roles should have `builtin` value 0Closed2016-10-07

Associated revisions

Revision f505ec3d (diff)
Added by Lukas Zapletal over 5 years ago

Fixes #18321 - added migration for builtin roles

History

#1 Updated by Lukas Zapletal over 5 years ago

  • Related to Bug #16828: Cloned roles should have `builtin` value 0 added

#2 Updated by Lukas Zapletal over 5 years ago

Workaround:

echo "Role.where(:builtin => nil).update_all(:builtin => 0)" | foreman-rake console

#3 Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Lukas Zapletal
  • Pull request https://github.com/theforeman/foreman/pull/4244 added

#4 Updated by Lukas Zapletal over 5 years ago

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

#5 Updated by Dominic Cleal over 5 years ago

  • Legacy Backlogs Release (now unused) set to 209

#6 Updated by Daniel Lobato Garcia over 5 years ago

  • Target version set to 1.11.0

#7 Updated by Marek Hulán over 5 years ago

  • Bugzilla link set to 1378544

Also available in: Atom PDF