Allow other roles to view revision_history only with the versions they have access

This commit is contained in:
Nishanth Vijayan 2016-08-17 05:05:46 +05:30
parent 51d569794f
commit 3a3d01150a
7 changed files with 16 additions and 9 deletions

View file

@ -136,7 +136,7 @@
= link_to(admin_conference_roles_path(@conference.short_title)) do
%span.fa.fa-group
Roles
- if can? :index, PaperTrail::Version.new(item_type: 'User')
- if can?(:index, PaperTrail::Version.new(conference_id: @conference.id, item_type: 'Event')) || can?(:index, PaperTrail::Version.new(conference_id: @conference.id, item_type: 'Registration'))
%li{:class=> active_nav_li(admin_conference_revision_history_path(@conference.short_title))}
= link_to(admin_conference_revision_history_path(@conference.short_title)) do
%span.fa.fa-history