Grant conference organizers permission to manage surveys

Resolves:

    Failures:

      1) Survey as an organizer create a survey
         Failure/Error: click_link 'New'

         Capybara::ElementNotFound:
           Unable to find link "New"
         # ./spec/features/surveys_spec.rb:18:in `block (3 levels) in <top (required)>'

    Failed examples:

    rspec ./spec/features/surveys_spec.rb:15 # Survey as an organizer create a survey
This commit is contained in:
Andrew Kvalheim 2022-03-11 11:11:54 -08:00
parent 51e65003bd
commit c052516009
2 changed files with 5 additions and 1 deletions

View file

@ -142,6 +142,10 @@ class AdminAbility
can :manage, Room, venue: { conference_id: conf_ids }
can :manage, Sponsor, conference_id: conf_ids
can :manage, SponsorshipLevel, conference_id: conf_ids
can :manage, Survey, surveyable_type: 'Conference',
surveyable_id: conf_ids
can :manage, SurveyQuestion, survey: { surveyable_type: 'Conference',
surveyable_id: conf_ids }
can :manage, Ticket, conference_id: conf_ids
can :create, TicketScanning do |ticket_scanning|
conf_id = ticket_scanning.physical_ticket.ticket_purchase.conference_id