18339: Delete previously trashed/zombie role groups.
authorTom Clegg <tom@curii.com>
Wed, 17 Nov 2021 20:49:34 +0000 (15:49 -0500)
committerTom Clegg <tom@curii.com>
Wed, 17 Nov 2021 20:49:34 +0000 (15:49 -0500)
(Role groups can no longer be trashed, see #18340.)

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

doc/admin/upgrading.html.textile.liquid
services/api/app/controllers/sys_controller.rb

index c1a7ae87dec28d0c9a439334eabc4c42a98f6180..59d41e6c25f54c9a5aae296b68a4c4b44f411d1e 100644 (file)
@@ -39,6 +39,10 @@ h2(#main). development main (as of 2021-11-10)
 
 "previous: Upgrading from 2.3.0":#v2_3_0
 
+h3. Previously trashed role groups will be deleted
+
+A bug in previous versions caused role groups to be flagged as trash instead of being deleted by a @DELETE@ operation. After upgrading, any groups that had been trashed this way will be deleted, and future @DELETE@ operations will delete role groups as intended.
+
 h3. Users are visible to other users by default
 
 When a new user is set up (either via @AutoSetupNewUsers@ config or via Workbench admin interface) the user immediately becomes visible to other users. To revert to the previous behavior, where the administrator must add two users to the same group using the Workbench admin interface in order for the users to see each other, change the new @Users.ActivatedUsersAreVisibleToOthers@ config to @false@.
index 08a672cc0be3b48d3ed425abb6005454f217d3b2..3d434f2d6943387cb0cec6bd8e80c0077c928705 100644 (file)
@@ -17,14 +17,14 @@ class SysController < ApplicationController
         where('is_trashed = false and trash_at < statement_timestamp()').
         update_all('is_trashed = true')
 
-      # Sweep trashed projects and their contents
+      # Sweep trashed projects and their contents (as well as role
+      # groups that were trashed before #18340 when that was
+      # disallowed)
       Group.
-        where({group_class: 'project'}).
         where('delete_at is not null and delete_at < statement_timestamp()').each do |project|
           delete_project_and_contents(project.uuid)
       end
       Group.
-        where({group_class: 'project'}).
         where('is_trashed = false and trash_at < statement_timestamp()').
         update_all('is_trashed = true')