Implement role authorization

This commit is contained in:
Stella Rouzi 2014-08-12 11:51:59 +03:00
parent 6755328c4c
commit e2fb434dc7
122 changed files with 1386 additions and 751 deletions

View file

@ -7,7 +7,7 @@
%small
= @event.subtitle
= link_to "Schedule", conference_schedule_path(@conference.short_title), :class =>"btn btn-success pull-right"
- if has_role?(current_user, "admin")
- if can? :edit, @event
= link_to "Edit", edit_admin_conference_event_path(@conference.short_title, @event), :class => "btn btn-mini btn-primary pull-right"
.row
.col-md-3
@ -37,7 +37,7 @@
%span.label{:style =>"background-color: #{@event.difficulty_level.color};"}
= @event.difficulty_level.title
- if @event.require_registration
= link_to "Registration required!", register_conference_path(@conference.short_title), :class => "btn btn-xs btn-warning"
= link_to "Registration required!", conference_register_path(@conference.short_title), :class => "btn btn-xs btn-warning"
.col-md-9
.row
.col-md-12