lib/tasks/init.rake in adeia-0.5.3 vs lib/tasks/init.rake in adeia-0.5.4

- old
+ new

@@ -1,9 +1,9 @@ namespace :adeia do desc "Create the elements and a group with all the privileges" task permissions: :environment do - elements = %w(articles adeia/permissions adeia/tokens) + ENV.fetch("elements", []).split(",") + elements = %w(adeia/permissions adeia/tokens adeia/groups) + ENV.fetch("elements", []).split(",") owner = Adeia::Group.find_or_create_by!(name: "superadmin") elements.each do |element| element = Adeia::Element.find_or_create_by!(name: element) Adeia::Permission.find_or_create_by!(adeia_element_id: element.id, owner_id: owner.id, owner_type: "Adeia::Group", permission_type: "all_entries", read_right: true, create_right: true, update_right: true, destroy_right: true)