app/policies/storytime/comment_policy.rb in storytime-1.2.0 vs app/policies/storytime/comment_policy.rb in storytime-2.0.0

- old
+ new

@@ -9,15 +9,19 @@ def is_owner? @comment.user == @user end + def is_admin_or_editor? + (@user && (@user.storytime_admin?(@comment.site) || @user.storytime_editor?(@comment.site))) + end + def create? is_owner? end def destroy? - is_owner? || (@user && (@user.storytime_admin? || @user.storytime_editor?)) + is_owner? || is_admin_or_editor? end def permitted_attributes [:content] end