Browse Source

CLDC-4332: Lint

pull/3305/head
samyou-softwire 3 weeks ago
parent
commit
c9ab543dac
  1. 1
      app/models/user.rb
  2. 2
      app/services/feature_toggle.rb

1
app/models/user.rb

@ -393,6 +393,7 @@ class User < ApplicationRecord
def role_is_allowed_to_be_in_organisation?(override_organisation_id: nil)
return true unless support? && FeatureToggle.support_organisation_allow_list.present?
FeatureToggle.support_organisation_allow_list.include?(override_organisation_id || organisation_id)
end

2
app/services/feature_toggle.rb

@ -38,6 +38,6 @@ class FeatureToggle
# IDs of organisations a user must be in to be allowed the support role
# if nil this feature will be disabled
def self.support_organisation_allow_list
return [1] if Rails.env.production?
[1] if Rails.env.production?
end
end

Loading…
Cancel
Save