Skip to content
Snippets Groups Projects
Commit dd67432a authored by Anusha Ranganathan's avatar Anusha Ranganathan
Browse files

Remove crc_1280_member permission from group

parent 7a4aaa08
No related branches found
No related tags found
1 merge request!353Remove crc_1280_member permission from group
namespace :rdms do
namespace :crc_1280_group do
task :delete_crc_member_permission, [:group_id] => :environment do |task, args|
group = Collection.find(args.group_id)
unless group.present?
abort("ERROR: Cannot find group #{args.group_id}")
end
if group.crc_collection_type != "group"
abort("ERROR: #{args.group_id} is not of type group")
end
puts "Deleting crc_1280_member permission for group #{args.group_id}"
permission_template = group.permission_template
access_grant = permission_template.access_grants.where(agent_id: "crc_1280_member").first
access_grant.destroy if access_grant.present?
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment