- serialize :properties, Hash
+
+ # Posgresql JSONB columns should NOT be declared as serialized, Rails 5
+ # already know how to properly treat them.
+ attribute :properties, :jsonbHash, default: {}
+
before_create :permission_to_attach_to_objects
before_update :permission_to_attach_to_objects
after_update :maybe_invalidate_permissions_cache
after_create :maybe_invalidate_permissions_cache
after_destroy :maybe_invalidate_permissions_cache
before_create :permission_to_attach_to_objects
before_update :permission_to_attach_to_objects
after_update :maybe_invalidate_permissions_cache
after_create :maybe_invalidate_permissions_cache
after_destroy :maybe_invalidate_permissions_cache
- attr_accessor :head_kind, :tail_kind
- validate :name_link_has_valid_name
- validate :name_link_owner_is_tail
+ validate :name_links_are_obsolete
# A user is permitted to create, update or modify a permission link
# if and only if they have "manage" permission on the object
# indicated by the permission link's head_uuid.
# A user is permitted to create, update or modify a permission link
# if and only if they have "manage" permission on the object
# indicated by the permission link's head_uuid.