self.author_id == au.id
end
+ def visible? au
+ if au == nil
+ return false if MagicNumber['run_mode'] == 1
+ elsif au.is_a?(Author)
+ return true if self.comic.own?(au)
+ else
+ return false
+ end
+ self.comic.visible? au
+ end
+
def self.default_panel_size
30
end
Story.find(:all, opt)
end
+ def self.show sid, au
+ opt = {}
+ opt.merge!(Story.show_opt)
+ res = Story.find sid, opt
+ raise ActiveRecord::Forbidden unless res.visible?(au)
+ res
+ end
+
def self.edit sid, au
opt = {}
opt.merge!(Story.show_opt)