From 37a0b2371542e0427be2a7b50981155a3060a522 Mon Sep 17 00:00:00 2001 From: Jillian Tullo Date: Thu, 11 Jan 2018 07:30:14 -0500 Subject: [PATCH] Add api_allowed_attributes to ExtManagementSystem and Provider The addition of the api_allowed_attributes method will allow individual providers to have better control over the attributes that are allowed on a provider, including aliases that are more clear to the user. --- app/models/ext_management_system.rb | 4 ++++ app/models/provider.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/models/ext_management_system.rb b/app/models/ext_management_system.rb index 3d52177f429..7e407760304 100644 --- a/app/models/ext_management_system.rb +++ b/app/models/ext_management_system.rb @@ -27,6 +27,10 @@ def self.supported_types_and_descriptions_hash end end + def self.api_allowed_attributes + %w[] + end + belongs_to :provider has_many :child_managers, :class_name => 'ExtManagementSystem', :foreign_key => 'parent_ems_id' diff --git a/app/models/provider.rb b/app/models/provider.rb index 0715e447018..d7d855e4594 100644 --- a/app/models/provider.rb +++ b/app/models/provider.rb @@ -34,6 +34,10 @@ def self.short_token parent.name.demodulize end + def self.api_allowed_attributes + %w[] + end + def image_name self.class.short_token.underscore end