Allow cfp team members to revert changes to events through event#history-content

This commit is contained in:
Nishanth Vijayan 2016-08-10 20:42:18 +05:30
parent 0a3466ca7c
commit da1c8fc691

View file

@ -210,6 +210,10 @@ class Ability
role.resource_type == 'Conference' && role.name == 'cfp' &&
(Conference.with_role(:cfp, user).pluck(:id).include? role.resource_id)
end
can [:index, :revert_object, :revert_attribute], PaperTrail::Version do |version|
version.item_type == 'Event' && (conf_ids_for_cfp.include? version.conference_id)
end
end
def signed_in_with_info_desk_role(user)