Fix authorization of conference versions
This commit is contained in:
parent
a61327f728
commit
fe8c7bb83f
1 changed files with 1 additions and 2 deletions
|
|
@ -7,8 +7,7 @@ module Admin
|
|||
@conf_ids_with_role = current_user.is_admin? ? Conference.pluck(:short_title) : Conference.with_role([:organizer, :cfp, :info_desk], current_user).pluck(:short_title)
|
||||
|
||||
return if @conference.blank?
|
||||
authorize! :index, PaperTrail::Version.new(conference_id: @conference.id)
|
||||
@versions = @versions.where(conference_id: @conference.id)
|
||||
@versions = PaperTrail::Version.where(conference_id: @conference.id).accessible_by(current_ability)
|
||||
end
|
||||
|
||||
def revert_attribute
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue