In Rails in your models_controller you can either whitelist your attributes:
def deal_params
params.require(:deal).permit(:name, :phone])
end
or blacklist your attributes
def deal_params
params.require(:deal).permit!.except(:id)
end
In Pundit you can whitelist your attributes:
class DealPolicy < ApplicationPolicy
def permitted_attributes
if user.admin? || user.owner_of?(deal)
[:name, :phone]
else
[:whatever_else_a_non-admin_can_modify]
end
end
end
but is it possible to blacklist them in any way?
As a side note, one should be aware of security risks with blacklisting attributes.