Permalink
Browse files

Additional verbose output for Organization conversion

  • Loading branch information...
cthielen committed Feb 26, 2014
1 parent a69b064 commit d1ba41fc7e1341fec7c70acf0e9a71ac344d1254
Showing with 5 additions and 1 deletion.
  1. +1 −1 config/initializers/last_updated.rb
  2. +4 −0 lib/tasks/organization_tasks.rake
@@ -1 +1 @@
-LAST_UPDATED = 'Tue Feb 25 16:36:25 PST 2014'
+LAST_UPDATED = 'Tue Feb 25 16:36:53 PST 2014'
@@ -180,11 +180,13 @@ namespace :organization do
# Remove those members from the OU-Group
ou_group.memberships.each do |membership|
+ puts "\t\tDestroying membership #{membership.id}"
membership.destroy
end
# Create a new rule within that group for "Department is..." to restore those members
# via calculation
+ puts "\t\t"
gr = GroupRule.create!({ column: "organization", condition: "is", value: organization.name, group_id: ou_group.id })
puts "\tConverting group rules using this group ..."
@@ -218,6 +220,8 @@ namespace :organization do
puts "WARNING: A rule exists for 'ou' #{rule.condition} '#{rule.value}'. If this is a group that should have been converted, the name likely couldn't be matched exactly and you will need to migrate the rule yourself. It is attached to group #{rule.group.id}, #{rule.group.name}."
end
+ puts "Group rules were generated using 'Organization is'. This should be converted to 'Department is' soon."
+
Authorization.ignore_access_control(false)
end

0 comments on commit d1ba41f

Please sign in to comment.