lib/scrivito/publish_ability.rb in scrivito_sdk-1.6.0.rc1 vs lib/scrivito/publish_ability.rb in scrivito_sdk-1.6.0.rc2

- old
+ new

@@ -1,14 +1,14 @@ module Scrivito - class PublishAbility < Struct.new(:scrivito_user, :obj_id) + class PublishAbility < Struct.new(:scrivito_user, :workspace, :obj_id) def as_json {restriction_messages: restriction_messages} end private def restriction_messages - obj = Obj.find(obj_id) + obj = workspace.objs.find_including_deleted(obj_id) scrivito_user.restriction_messages_for(obj) end end end