GRN2-xx: Fixed issue with recording row and added small fix to roles migration (Fixed #717, #718) (#719)

* Fixed issue with recording row and added small fix to roles migration

* Fixed issue with edit user avatar

* Small bug fixes for user settings

* Added autofocus on name field when joining

* Added extra check for admin password check

* Rubocop fixes
This commit is contained in:
farhatahmad
2019-08-01 16:53:26 -04:00
committed by Jesus Federico
parent 4fc1714db8
commit 60f5cd5c81
7 changed files with 99 additions and 92 deletions

View File

@ -52,7 +52,12 @@ class AddCustomRoles < ActiveRecord::Migration[5.2]
new_assignments = []
old_assignments.each do |assignment|
user = User.find(assignment["user_id"])
begin
user = User.find(assignment["user_id"])
rescue
next
end
new_assignment = { "user_id" => assignment["user_id"] }
if assignment["role_id"] == super_admin_id
new_assignment["new_role_id"] = generate_scoped_role(user, "super_admin")