Fix authorization
This commit is contained in:
parent
33bbbc9566
commit
d41988c74f
3 changed files with 8 additions and 4 deletions
|
|
@ -14,7 +14,7 @@
|
||||||
= semantic_form_for(@conference, url: update_conference_admin_conference_questions_path(@conference.short_title)) do |f|
|
= semantic_form_for(@conference, url: update_conference_admin_conference_questions_path(@conference.short_title)) do |f|
|
||||||
.questions{id: 'myquestions'}
|
.questions{id: 'myquestions'}
|
||||||
= render partial: 'questions'
|
= render partial: 'questions'
|
||||||
- if can? :update, @conference
|
- if can? :update, Question.new(conference_id: @conference.id)
|
||||||
= f.submit "Save Questions", class: 'btn btn-primary pull-right',
|
= f.submit "Save Questions", class: 'btn btn-primary pull-right',
|
||||||
confirm: 'Are you sure you want to make these changes?'
|
confirm: 'Are you sure you want to make these changes?'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,8 @@
|
||||||
- if can? :update, Question.new(conference_id: @conference.id)
|
- if can? :update, Question.new(conference_id: @conference.id)
|
||||||
%li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))}
|
%li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))}
|
||||||
= link_to 'Questions', admin_conference_questions_path(@conference.short_title)
|
= link_to 'Questions', admin_conference_questions_path(@conference.short_title)
|
||||||
|
|
||||||
|
- if (can? :manage, @conference.sponsorship_levels.build) || (can? :manage, @conference.sponsors.build) || (can? :manage, @conference.tickets.build)
|
||||||
%li
|
%li
|
||||||
%a
|
%a
|
||||||
%span.fa.fa-usd
|
%span.fa.fa-usd
|
||||||
|
|
@ -104,12 +106,14 @@
|
||||||
- if can? :update, @conference.tickets.build
|
- if can? :update, @conference.tickets.build
|
||||||
%li{ class: active_nav_li(admin_conference_tickets_path(@conference.short_title)) }
|
%li{ class: active_nav_li(admin_conference_tickets_path(@conference.short_title)) }
|
||||||
= link_to 'Tickets', admin_conference_tickets_path(@conference.short_title)
|
= link_to 'Tickets', admin_conference_tickets_path(@conference.short_title)
|
||||||
|
|
||||||
|
- if (can? :manage, @conference.targets.build) || (can? :manage, @conference.campaigns.build)
|
||||||
%li
|
%li
|
||||||
%a
|
%a
|
||||||
%span.fa.fa-money
|
%span.fa.fa-money
|
||||||
Objectives
|
Objectives
|
||||||
%ul
|
%ul
|
||||||
- if can? :update, @conference
|
- if can? :update, @conference.campaigns.build
|
||||||
%li{class: active_nav_li(admin_conference_campaigns_path(@conference.short_title))}
|
%li{class: active_nav_li(admin_conference_campaigns_path(@conference.short_title))}
|
||||||
= link_to 'Campaigns', admin_conference_campaigns_path(@conference.short_title)
|
= link_to 'Campaigns', admin_conference_campaigns_path(@conference.short_title)
|
||||||
- if can? :update, @conference.targets.build
|
- if can? :update, @conference.targets.build
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
= link_to(destroy_user_session_path, :method=>'delete') do
|
= link_to(destroy_user_session_path, :method=>'delete') do
|
||||||
%span.fa.fa-minus
|
%span.fa.fa-minus
|
||||||
Sign out
|
Sign out
|
||||||
- if can? :index, Conference
|
- if can? :manage, Conference
|
||||||
%li.divider
|
%li.divider
|
||||||
%li
|
%li
|
||||||
= link_to(admin_conference_index_path()) do
|
= link_to(admin_conference_index_path()) do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue