From 5f17f421b176d48ef556fb379f59bbb7d284b48e Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 31 Jul 2026 14:35:16 +0200 Subject: Retire the unused per-node permission subsystem Every path through Permission raised or lied: validates_presence_of on a boolean made granted = false unsaveable, since false.blank? is true; get_permission_for read a nonexistent identifier attribute; has_permission? called an undefined plural method and returned a truthy relation in every case; and set_permission mutated granted without saving. Nothing outside the model referenced it and the table was empty. --- app/models/node.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'app/models/node.rb') diff --git a/app/models/node.rb b/app/models/node.rb index c8f9a210..1823daa4 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -18,7 +18,6 @@ class Node < ApplicationRecord # them -- this dependent: :destroy is their only cleanup on node destroy. belongs_to :autosave, :class_name => "Page", :foreign_key => :autosave_id, :dependent => :destroy, optional: true - has_many :permissions, :dependent => :destroy has_many :events, :dependent => :destroy belongs_to :lock_owner, :class_name => "User", :foreign_key => :locking_user_id, optional: true -- cgit v1.3