From fabc3170b700f4009887e44df3e63c5ea06c51ac Mon Sep 17 00:00:00 2001
From: Sony Mathew
Date: Mon, 4 May 2020 23:06:42 +0530
Subject: [PATCH] Feature: Feature flags on account (#814) (#815)
* Feature: Feature flags on account (#814)
* Added the new column on account model for managing feature flags
* Added the inbound email flag
* Locked the settings of this eature in account settings based on this
* Encapsulated the feature flaging as a concern. With this, we can re-use the same concern if we introduce this in other models like user or inbox or so.
* Added the features in the account api
* Changed Rails/FilePath style - rubocop issue
* Revert "Changed Rails/FilePath style - rubocop issue"
This reverts commit 3a42d3b9c9b3a2fde8bc7256fd704b6fcaf54040.
* Disabling rubocop on codeclimate as we already have this in CICD
---
.codeclimate.yml | 2 +-
.../dashboard/settings/account/Index.vue | 11 +++-
app/models/account.rb | 2 +
app/models/concerns/features.rb | 57 +++++++++++++++++++
app/views/api/v1/accounts/show.json.jbuilder | 1 +
.../api/v1/accounts/update.json.jbuilder | 1 +
config/features.yml | 5 ++
...20200503151130_add_account_feature_flag.rb | 5 ++
db/schema.rb | 3 +-
9 files changed, 83 insertions(+), 4 deletions(-)
create mode 100644 app/models/concerns/features.rb
create mode 100644 config/features.yml
create mode 100644 db/migrate/20200503151130_add_account_feature_flag.rb
diff --git a/.codeclimate.yml b/.codeclimate.yml
index 761ad4d7a..6365ca706 100644
--- a/.codeclimate.yml
+++ b/.codeclimate.yml
@@ -1,7 +1,7 @@
version: "2"
plugins:
rubocop:
- enabled: true
+ enabled: false
channel: rubocop-0-73
eslint:
enabled: false
diff --git a/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue
index af595ecc5..24998e33d 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue
@@ -41,7 +41,7 @@
:placeholder="$t('GENERAL_SETTINGS.FORM.DOMAIN.PLACEHOLDER')"
/>
-