Skip to content

Commit

Permalink
Added permission template to seeded admin set
Browse files Browse the repository at this point in the history
  • Loading branch information
dolsysmith committed Aug 14, 2024
1 parent d14675c commit dcecd47
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
# admin sets and collection types
default_admin_set_id = AdminSet.find_or_create_default_admin_set_id
admin_set_collection_type = FactoryBot.create(:admin_set_collection_type)
gw_etds_admin_set = FactoryBot.create(:admin_set, title: ["ETDs"])
gw_etds_admin_set = FactoryBot.create(:admin_set, title: ["ETDs"],edit_users: [admin_user.user_key, content_admin_user.user_key])

FactoryBot.create(:permission_template_access,
:deposit,
permission_template: FactoryBot.create(:permission_template, source_id: gw_etds_admin_set.id, with_admin_set: true, with_active_workflow: true),
agent_type: 'user',
agent_id: admin_user.user_key)
# collections
5.times do
FactoryBot.create(:collection, user: admin_user)
Expand Down Expand Up @@ -40,9 +45,7 @@
abstract: ["Ey I'm abstracting here"],
keyword: ["Testing", "Examining", "Prodding"],
license: ["http://www.europeana.eu/portal/rights/rr-r.html"],
rights_notes: [],
rights_statement: ["http://rightsstatements.org/vocab/InC/1.0/"],
access_right: [],
publisher: ["A Pretty Cool Publisher"],
date_created: [rand(1900..2010).to_s],
subject: ["Automated Testing"],
Expand Down

0 comments on commit dcecd47

Please sign in to comment.