Sha256: 535d2193761439a6f631951518201fc7c33b87369dcc1cb7c2003b6511062ab4
Contents?: true
Size: 982 Bytes
Versions: 60
Compression:
Stored size: 982 Bytes
Contents
# frozen_string_literal: true module Ibrain # Ibrain::PermittedAttributes contains the attributes permitted through strong # params in various controllers in the frontend. Extensions and stores that # need additional params to be accepted can mutate these arrays to add them. module PermittedAttributes ATTRIBUTES = [ :address_attributes, :user_attributes ] mattr_reader(*ATTRIBUTES) @@address_attributes = [ :id, :name, :address1, :address2, :city, :country_id, :state_id, :zipcode, :phone, :state_name, :province_id, :ward_id, :district_id ] # Intentionally leaving off email here to prevent privilege escalation # by changing a user with higher priveleges' email to one a lower-priveleged # admin owns. Creating a user with an email is handled separate at the # controller level. @@user_attributes = [:name, :email, :provider, :uid, :first_name, :last_name, :password, :password_confirmation] end end
Version data entries
60 entries across 60 versions & 1 rubygems