mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Add rake task to re-add deleted roles from all conferences
This commit is contained in:
parent
48b48e88ac
commit
3129c196fa
1 changed files with 15 additions and 0 deletions
15
lib/tasks/roles.rake
Normal file
15
lib/tasks/roles.rake
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
namespace :roles do
|
||||
desc 'Adds back deleted roles to all conferences'
|
||||
task add: :environment do
|
||||
|
||||
Conference.all.each do |c|
|
||||
Role.where(name: 'organizer', resource: c).first_or_create(description: 'For the organizers of the conference (who shall have full access)')
|
||||
Role.where(name: 'cfp', resource: c).first_or_create(description: 'For the members of the CfP team')
|
||||
Role.where(name: 'info_desk', resource: c).first_or_create(description: 'For the members of the Info Desk team')
|
||||
Role.where(name: 'volunteers_coordinator', resource: c).first_or_create(description: 'For the people in charge of volunteers')
|
||||
end
|
||||
|
||||
puts 'All done!'
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue