From 141beb4ebf10ab612742000a913f6997916c8458 Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Mon, 11 Mar 2024 16:39:13 +0000 Subject: [PATCH] Revert "One-off rake task to add the GDS Editor permission " --- lib/tasks/once_off/add_gds_editor_permission.rake | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 lib/tasks/once_off/add_gds_editor_permission.rake diff --git a/lib/tasks/once_off/add_gds_editor_permission.rake b/lib/tasks/once_off/add_gds_editor_permission.rake deleted file mode 100644 index 00a38c4a2..000000000 --- a/lib/tasks/once_off/add_gds_editor_permission.rake +++ /dev/null @@ -1,13 +0,0 @@ -namespace :once_off do - desc "Update all GDS Users with Imminence signin permission to give them GDS Editor permission" - task add_gds_editor_permission: :environment do - imminence = Doorkeeper::Application.find_by(name: "Imminence") - imminence_signin = imminence.supported_permissions.find_by(name: "signin") - imminence_gds_editor = imminence.supported_permissions.find_or_create_by!(name: "GDS Editor", delegatable: false, grantable_from_ui: true, default: false) - - Organisation.where(slug: "government-digital-service").first.users.with_permission(imminence_signin).each do |user| - user.supported_permissions << imminence_gds_editor - user.save! - end - end -end