Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Replace gon with inputs

Oliver Günther60886406bbd5
diff --git a/app/components/enterprise_edition/upsell_buttons_component.rb b/app/components/enterprise_edition/upsell_buttons_component.rb
index b9d6def22cd..2eaf28d164b 100644
--- a/app/components/enterprise_edition/upsell_buttons_component.rb
+++ b/app/components/enterprise_edition/upsell_buttons_component.rb
@@ -68,7 +68,10 @@ module EnterpriseEdition
return if EnterpriseToken.active?
return unless User.current.admin?
- helpers.angular_component_tag("opce-free-trial-button")
+ helpers.angular_component_tag(
+ "opce-free-trial-button",
+ inputs: helpers.enterprise_angular_trial_inputs
+ )
end
# Allow providing a custom upgrade now button
diff --git a/app/components/enterprise_edition/upsell_page_component.html.erb b/app/components/enterprise_edition/upsell_page_component.html.erb
index 4cc7504e4c9..74834e53075 100644
--- a/app/components/enterprise_edition/upsell_page_component.html.erb
+++ b/app/components/enterprise_edition/upsell_page_component.html.erb
@@ -1,8 +1,3 @@
-<% if respond_to?(:gon) %>
- <% helpers.write_augur_to_gon %>
- <% helpers.write_trial_key_to_gon if !EnterpriseToken.current.present? %>
- <% end %>
-
<div class="op-enterprise-upsell-page" data-test-selector="op-enterprise-upsell-page">
<%=
render(Primer::OpenProject::FlexLayout.new(justify_content: :center, align_items: :center)) do |flex|
diff --git a/app/controllers/custom_actions_controller.rb b/app/controllers/custom_actions_controller.rb
index 6c888814f80..44cd09e964f 100644
--- a/app/controllers/custom_actions_controller.rb
+++ b/app/controllers/custom_actions_controller.rb
@@ -27,7 +27,6 @@
#++
class CustomActionsController < ApplicationController
- include EnterpriseTrialHelper
before_action :require_admin
before_action :require_enterprise_token
diff --git a/app/controllers/custom_styles_controller.rb b/app/controllers/custom_styles_controller.rb
index 9212d1599ba..df0ae9c8a60 100644
--- a/app/controllers/custom_styles_controller.rb
+++ b/app/controllers/custom_styles_controller.rb
@@ -44,7 +44,6 @@ class CustomStylesController < ApplicationController
except: UNGUARDED_ACTIONS + %i[upsell]
skip_before_action :check_if_login_required,
only: UNGUARDED_ACTIONS
- before_action :write_augur_to_gon, only: %i[upsell]
no_authorization_required! *UNGUARDED_ACTIONS
def default_url_options
diff --git a/app/controllers/enterprises_controller.rb b/app/controllers/enterprises_controller.rb
index 68dd60d575c..fe0d3dc483b 100644
--- a/app/controllers/enterprises_controller.rb
+++ b/app/controllers/enterprises_controller.rb
@@ -26,25 +26,16 @@
# See COPYRIGHT and LICENSE files for more details.
#++
class EnterprisesController < ApplicationController
- include EnterpriseTrialHelper
-
layout "admin"
menu_item :enterprise
- before_action :chargebee_content_security_policy
- before_action :youtube_content_security_policy
before_action :require_admin
before_action :check_user_limit, only: [:show]
before_action :check_domain, only: [:show]
- before_action :render_gon
def show
@current_token = EnterpriseToken.current
@token = @current_token || EnterpriseToken.new
-
- if !@current_token.present?
- helpers.write_trial_key_to_gon
- end
end
def create # rubocop:disable Metrics/AbcSize
@@ -94,10 +85,6 @@ class EnterprisesController < ApplicationController
private
- def render_gon
- helpers.write_augur_to_gon
- end
-
def check_user_limit
if OpenProject::Enterprise.user_limit_reached?
flash.now[:warning] = I18n.t(
diff --git a/app/controllers/placeholder_users_controller.rb b/app/controllers/placeholder_users_controller.rb
index 50dffa8760d..da74c42878e 100644
--- a/app/controllers/placeholder_users_controller.rb
+++ b/app/controllers/placeholder_users_controller.rb
@@ -27,7 +27,6 @@
#++
class PlaceholderUsersController < ApplicationController
- include EnterpriseTrialHelper
layout "admin"
before_action :authorize_global, except: %i[show]
no_authorization_required! :show
diff --git a/app/helpers/enterprise_helper.rb b/app/helpers/enterprise_helper.rb
index c027c59a3f9..6a429ce6330 100644
--- a/app/helpers/enterprise_helper.rb
+++ b/app/helpers/enterprise_helper.rb
@@ -29,21 +29,27 @@
#++
module EnterpriseHelper
- def write_augur_to_gon
- gon.augur_url = OpenProject::Configuration.enterprise_trial_creation_host
- gon.token_version = OpenProject::Token::VERSION
- end
-
- def write_trial_key_to_gon
+ def enterprise_angular_trial_inputs
trial_key = Token::EnterpriseTrialKey.find_by(user_id: User.system.id)
- if trial_key
- gon.ee_trial_key = {
- value: trial_key.value,
- created: trial_key.created_at
- }
+ token = EnterpriseToken.current
+
+ if token.present? || trial_key.blank?
+ enterprise_angular_static_inputs
+ else
+ enterprise_angular_static_inputs.merge(
+ trialKey: trial_key.value,
+ trialCreatedAt: trial_key.created_at.to_date.iso8601
+ )
end
end
+ def enterprise_angular_static_inputs
+ {
+ augurUrl: OpenProject::Configuration.enterprise_trial_creation_host,
+ tokenVersion: OpenProject::Token::VERSION
+ }
+ end
+
def enterprise_token_plan_name(enterprise_token)
plan = enterprise_token.plan.to_s
diff --git a/app/helpers/enterprise_trial_helper.rb b/app/helpers/enterprise_trial_helper.rb
deleted file mode 100644
index 9d56d2b1c4c..00000000000
--- a/app/helpers/enterprise_trial_helper.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-module EnterpriseTrialHelper
- def chargebee_content_security_policy
- script_src = %w(js.chargebee.com)
- default_src = script_src + ["#{OpenProject::Configuration.enterprise_chargebee_site}.chargebee.com"]
-
- append_content_security_policy_directives(
- script_src:,
- style_src: default_src,
- frame_src: default_src
- )
- end
-
- def youtube_content_security_policy
- append_content_security_policy_directives(
- frame_src: %w(https://www.youtube.com)
- )
- end
-end
diff --git a/app/views/enterprises/_info.html.erb b/app/views/enterprises/_info.html.erb
index 563d795a5fd..77fcffcd39c 100644
--- a/app/views/enterprises/_info.html.erb
+++ b/app/views/enterprises/_info.html.erb
@@ -33,7 +33,11 @@ See COPYRIGHT and LICENSE files for more details.
<div class="upsell--information-container">
<div class='upsell-information'>
- <opce-enterprise-base></opce-enterprise-base>
+ <%= angular_component_tag(
+ "opce-enterprise-base",
+ inputs: enterprise_angular_trial_inputs
+ )
+ %>
</div>
<div class='upsell-actions'>
diff --git a/app/views/layouts/notifications.html.erb b/app/views/layouts/notifications.html.erb
index fd9cd903c5c..1026637bc1b 100644
--- a/app/views/layouts/notifications.html.erb
+++ b/app/views/layouts/notifications.html.erb
@@ -27,6 +27,4 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<% write_augur_to_gon %>
-
<%= render template: "layouts/base", locals: local_assigns.merge({ menu_name: :notifications_menu }) %>
diff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rb
index 4ace3c3c620..6e0d364215f 100644
--- a/config/initializers/secure_headers.rb
+++ b/config/initializers/secure_headers.rb
@@ -51,11 +51,22 @@ Rails.application.config.after_initialize do
assets_src << asset_host if asset_host.present?
# Valid for iframes
- frame_src = %w['self' https://player.vimeo.com]
+ frame_src = %w['self' https://player.vimeo.com https://www.youtube.com]
frame_src << OpenProject::Configuration[:security_badge_url]
# Default src
- default_src = %w('self') + OpenProject::Configuration.remote_storage_hosts
+ default_src = %w('self')
+
+ # Attachment uploaders
+ default_src += OpenProject::Configuration.remote_storage_hosts
+
+ # Chargebee self-service
+ frame_src += [
+ "https://js.chargebee.com/",
+ "#{OpenProject::Configuration.enterprise_chargebee_site}.chargebee.com"
+ ]
+
+ default_src << "#{OpenProject::Configuration.enterprise_chargebee_site}.chargebee.com"
# Allow requests to CLI in dev mode
connect_src = default_src + [OpenProject::Configuration.enterprise_trial_creation_host]
@@ -78,7 +89,7 @@ Rails.application.config.after_initialize do
end
# Allow to extend the script-src in specific situations
- script_src = assets_src
+ script_src = assets_src + %w(js.chargebee.com)
# Allow unsafe-eval for rack-mini-profiler
if Rails.env.development? && ENV.fetch("OPENPROJECT_RACK_PROFILER_ENABLED", false)
diff --git a/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-trial.component.ts b/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-trial.component.ts
index 84c1ae01cc9..225c4d80a81 100644
--- a/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-trial.component.ts
+++ b/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-trial.component.ts
@@ -31,7 +31,7 @@ import {
ChangeDetectionStrategy,
Component,
ElementRef,
- OnInit,
+ OnInit, Input,
} from '@angular/core';
import { distinctUntilChanged } from 'rxjs/operators';
import { I18nService } from 'core-app/core/i18n/i18n.service';
@@ -52,6 +52,8 @@ import { IEnterpriseData } from 'core-app/features/enterprise/enterprise-trial.m
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class EEActiveTrialComponent extends EEActiveTrialBase implements OnInit {
+ @Input() public trialKey:string|undefined;
+
public subscriber:string;
public email:string;
@@ -75,7 +77,6 @@ export class EEActiveTrialComponent extends EEActiveTrialBase implements OnInit
readonly cdRef:ChangeDetectorRef,
readonly I18n:I18nService,
readonly http:HttpClient,
- readonly Gon:GonService,
public eeTrialService:EnterpriseTrialService,
) {
super(I18n);
@@ -98,12 +99,11 @@ export class EEActiveTrialComponent extends EEActiveTrialBase implements OnInit
}
private initialize():void {
- const eeTrialKey = this.Gon.get('ee_trial_key') as { value:string } | undefined;
const { data } = this.eeTrialService.current;
- if (eeTrialKey && !data) {
+ if (this.trialKey && !data) {
// after reload: get data from Augur using the trial key saved in gon
- const trialLink = `${this.eeTrialService.baseUrlAugur}/public/v1/trials/${eeTrialKey.value}`;
+ const trialLink = `${this.eeTrialService.baseUrlAugur}/public/v1/trials/${this.trialKey}`;
this.eeTrialService.store.update({ trialLink });
this.getUserDataFromAugur(trialLink);
}
diff --git a/frontend/src/app/features/enterprise/enterprise-base.component.html b/frontend/src/app/features/enterprise/enterprise-base.component.html
index 167a43b6c76..4a5faa59f74 100644
--- a/frontend/src/app/features/enterprise/enterprise-base.component.html
+++ b/frontend/src/app/features/enterprise/enterprise-base.component.html
@@ -12,7 +12,10 @@
</div>
<ng-template #alreadyRequested>
- <enterprise-trial-waiting></enterprise-trial-waiting>
+ <enterprise-trial-waiting
+ [trialKey]="trialKey"
+ [trialCreatedAt]="trialCreatedAt"
+ ></enterprise-trial-waiting>
<p class="op-enterprise-base--confirmation-hint">{{ text.email_not_received }}
<a (click)="openTrialModal()">{{ text.try_another_email }}</a>
</p>
diff --git a/frontend/src/app/features/enterprise/enterprise-base.component.ts b/frontend/src/app/features/enterprise/enterprise-base.component.ts
index c1e924d7289..dfd54a99418 100644
--- a/frontend/src/app/features/enterprise/enterprise-base.component.ts
+++ b/frontend/src/app/features/enterprise/enterprise-base.component.ts
@@ -26,11 +26,12 @@
// See COPYRIGHT and LICENSE files for more details.
//++
-import { ChangeDetectionStrategy, Component, Injector } from '@angular/core';
+import { ChangeDetectionStrategy, Component, ElementRef, Injector, Input, OnInit } from '@angular/core';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import { EnterpriseTrialModalComponent } from 'core-app/features/enterprise/enterprise-modal/enterprise-trial.modal';
import { OpModalService } from 'core-app/shared/components/modal/modal.service';
import { EnterpriseTrialService } from 'core-app/features/enterprise/enterprise-trial.service';
+import { populateInputsFromDataset } from 'core-app/shared/components/dataset-inputs';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
@@ -39,7 +40,15 @@ import { EnterpriseTrialService } from 'core-app/features/enterprise/enterprise-
styleUrls: ['./enterprise-base.component.sass'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
-export class EnterpriseBaseComponent {
+export class EnterpriseBaseComponent implements OnInit {
+ @Input() public trialKey:string|undefined;
+
+ @Input() public trialCreatedAt:string|undefined;
+
+ @Input() public augurUrl:string;
+
+ @Input() public tokenVersion:string;
+
public text = {
button_trial: this.I18n.t('js.admin.enterprise.upsell.button_start_trial'),
button_book: this.I18n.t('js.admin.enterprise.upsell.button_book_now'),
@@ -53,11 +62,19 @@ export class EnterpriseBaseComponent {
};
constructor(
+ readonly elementRef:ElementRef<HTMLElement>,
protected I18n:I18nService,
protected opModalService:OpModalService,
readonly injector:Injector,
public eeTrialService:EnterpriseTrialService,
) {
+ populateInputsFromDataset(this);
+ }
+
+ ngOnInit() {
+ this.eeTrialService.baseUrlAugur = this.augurUrl;
+ this.eeTrialService.tokenVersion = this.tokenVersion;
+ this.eeTrialService.setTrialKey(this.trialKey);
}
public openTrialModal() {
@@ -67,6 +84,6 @@ export class EnterpriseBaseComponent {
}
public get noTrialRequested() {
- return window.gon.ee_trial_key === undefined;
+ return !this.trialKey;
}
}
diff --git a/frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.html b/frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.html
index 114a8d88312..a6c946d4c00 100644
--- a/frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.html
+++ b/frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.html
@@ -14,6 +14,7 @@
<!-- <a id="op-ee-trial-waiting-resend-link"
data-test-selector='op-ee-trial-waiting-resend-link' (click)="resendMail()">{{ text.resend }}</a> -->
<button
+ *ngIf="resendLink$ | async"
class="spot-link op-ee-trial-waiting-resend-link"
data-test-selector='op-ee-trial-waiting-resend-link'
(click)="resendMail()">
diff --git a/frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts b/frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts
index 0bf17b3bc4e..552af13ecc9 100644
--- a/frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts
+++ b/frontend/src/app/features/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts
@@ -28,7 +28,7 @@
import {
Component,
- ElementRef,
+ ElementRef, Input,
OnInit,
} from '@angular/core';
import { I18nService } from 'core-app/core/i18n/i18n.service';
@@ -46,8 +46,14 @@ import { IEnterpriseData } from 'core-app/features/enterprise/enterprise-trial.m
styleUrls: ['./ee-trial-waiting.component.sass'],
})
export class EETrialWaitingComponent implements OnInit {
+ @Input() public trialKey:string|undefined;
+
+ @Input() public trialCreatedAt:string|undefined;
+
created = this.timezoneService.formattedDate(new Date().toString());
+ resendLink$ = this.eeTrialService.resendLink$;
+
email = '';
public text = {
@@ -64,7 +70,8 @@ export class EETrialWaitingComponent implements OnInit {
status_waiting: this.I18n.t('js.admin.enterprise.trial.status_waiting'),
};
- constructor(readonly elementRef:ElementRef,
+ constructor(
+ readonly elementRef:ElementRef,
readonly I18n:I18nService,
protected http:HttpClient,
protected toastService:ToastService,
@@ -73,10 +80,8 @@ export class EETrialWaitingComponent implements OnInit {
}
ngOnInit():void {
- const eeTrialKey = window.gon.ee_trial_key as { created:string }|undefined;
- if (eeTrialKey) {
- const savedDateStr = eeTrialKey.created.split(' ')[0];
- this.created = this.timezoneService.formattedDate(savedDateStr);
+ if (this.trialCreatedAt) {
+ this.created = this.timezoneService.formattedDate(this.trialCreatedAt);
}
this.eeTrialService
diff --git a/frontend/src/app/features/enterprise/enterprise-trial.service.ts b/frontend/src/app/features/enterprise/enterprise-trial.service.ts
index 654d2d0f816..77b90e25120 100644
--- a/frontend/src/app/features/enterprise/enterprise-trial.service.ts
+++ b/frontend/src/app/features/enterprise/enterprise-trial.service.ts
@@ -46,6 +46,8 @@ export class EnterpriseTrialService {
private query = new Query(this.store);
+ resendLink$ = this.query.select('resendLink');
+
confirmed$ = this.query.select('confirmed');
cancelled$ = this.query.select('cancelled');
@@ -90,9 +92,11 @@ export class EnterpriseTrialService {
shareReplay(1),
);
- public readonly baseUrlAugur:string;
+ public baseUrlAugur:string;
+
+ public tokenVersion:string;
- public readonly tokenVersion:string;
+ public trialKey:string|undefined;
public text = {
invalid_email: this.I18n.t('js.admin.enterprise.trial.form.invalid_email'),
@@ -105,12 +109,13 @@ export class EnterpriseTrialService {
protected http:HttpClient,
readonly pathHelper:PathHelperService,
protected toastService:ToastService,
- readonly Gon:GonService,
) {
- this.baseUrlAugur = this.Gon.get('augur_url') as string;
- this.tokenVersion = this.Gon.get('token_version') as string;
+ }
+
+ public setTrialKey(trialKey:string|undefined):void {
+ this.trialKey = trialKey;
- if (this.Gon.get('ee_trial_key')) {
+ if (this.trialKey) {
this.setMailSubmittedStatus();
}
}
diff --git a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts
index 63c359cae07..e583dfff5d6 100644
--- a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts
+++ b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.ts
@@ -26,7 +26,15 @@
// See COPYRIGHT and LICENSE files for more details.
//++
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, OnInit } from '@angular/core';
+import {
+ ChangeDetectionStrategy,
+ ChangeDetectorRef,
+ Component,
+ ElementRef,
+ Injector,
+ Input,
+ OnInit,
+} from '@angular/core';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import { EnterpriseTrialModalComponent } from 'core-app/features/enterprise/enterprise-modal/enterprise-trial.modal';
import { OpModalService } from 'core-app/shared/components/modal/modal.service';
@@ -36,11 +44,7 @@ import { distinctUntilChanged } from 'rxjs/operators';
import { HttpClient } from '@angular/common/http';
import { GonService } from 'core-app/core/gon/gon.service';
import { IEnterpriseData } from 'core-app/features/enterprise/enterprise-trial.model';
-
-export interface EETrialKey {
- created:string;
- value:string;
-}
+import { populateInputsFromDataset } from 'core-app/shared/components/dataset-inputs';
@Component({
selector: 'opce-free-trial-button',
@@ -48,6 +52,14 @@ export interface EETrialKey {
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FreeTrialButtonComponent implements OnInit {
+ @Input() public trialKey:string|undefined;
+
+ @Input() public trialCreatedAt:string|undefined;
+
+ @Input() public augurUrl:string;
+
+ @Input() public tokenVersion:string;
+
created = this.timezoneService.formattedDate(new Date().toString());
email = '';
@@ -61,6 +73,7 @@ export class FreeTrialButtonComponent implements OnInit {
};
constructor(
+ readonly elementRef:ElementRef<HTMLElement>,
protected I18n:I18nService,
protected opModalService:OpModalService,
readonly injector:Injector,
@@ -70,9 +83,14 @@ export class FreeTrialButtonComponent implements OnInit {
public eeTrialService:EnterpriseTrialService,
readonly timezoneService:TimezoneService,
) {
+ populateInputsFromDataset(this);
}
ngOnInit():void {
+ this.eeTrialService.baseUrlAugur = this.augurUrl;
+ this.eeTrialService.tokenVersion = this.tokenVersion;
+ this.eeTrialService.setTrialKey(this.trialKey);
+
this.eeTrialService
.userData$
.pipe(
@@ -87,15 +105,13 @@ export class FreeTrialButtonComponent implements OnInit {
}
private initialize():void {
- const eeTrialKey = this.Gon.get('ee_trial_key') as EETrialKey;
- if (eeTrialKey) {
- const savedDateStr = eeTrialKey.created.split(' ')[0];
- this.created = this.timezoneService.formattedDate(savedDateStr);
+ if (this.trialCreatedAt) {
+ this.created = this.timezoneService.formattedDate(this.trialCreatedAt);
const { data } = this.eeTrialService.store.getValue();
if (data) {
// after reload: get data from Augur using the trial key saved in gon
- const trialLink = `${this.eeTrialService.baseUrlAugur}/public/v1/trials/${eeTrialKey.value}`;
+ const trialLink = `${this.eeTrialService.baseUrlAugur}/public/v1/trials/${this.trialKey}`;
this.eeTrialService.store.update({ trialLink });
this.getUserDataFromAugur(trialLink);
}
@@ -123,7 +139,6 @@ export class FreeTrialButtonComponent implements OnInit {
}
public get trialRequested():boolean {
- const eeTrialKey = this.Gon.get('ee_trial_key') as EETrialKey|undefined;
- return !!eeTrialKey;
+ return !!this.trialKey;
}
}
diff --git a/modules/storages/app/controllers/storages/admin/storages_controller.rb b/modules/storages/app/controllers/storages/admin/storages_controller.rb
index af19e1088d8..dfc3f4a5733 100644
--- a/modules/storages/app/controllers/storages/admin/storages_controller.rb
+++ b/modules/storages/app/controllers/storages/admin/storages_controller.rb
@@ -50,7 +50,6 @@ class Storages::Admin::StoragesController < ApplicationController
change_health_notifications_enabled replace_oauth_application]
before_action :ensure_valid_wizard_parameters, only: [:new]
before_action :require_ee_token_for_one_drive, only: [:new]
- before_action :write_augur_to_gon, only: %i[upsell]
menu_item :external_file_storages
diff --git a/modules/team_planner/app/controllers/team_planner/team_planner_controller.rb b/modules/team_planner/app/controllers/team_planner/team_planner_controller.rb
index e16d0e49f60..afb7f4ab7dc 100644
--- a/modules/team_planner/app/controllers/team_planner/team_planner_controller.rb
+++ b/modules/team_planner/app/controllers/team_planner/team_planner_controller.rb
@@ -1,13 +1,11 @@
module ::TeamPlanner
class TeamPlannerController < BaseController
- include EnterpriseTrialHelper
include EnterpriseHelper
include Layout
before_action :load_and_authorize_in_optional_project
before_action :build_plan_view, only: %i[new]
before_action :require_ee_token, except: %i[upsell]
before_action :find_plan_view, only: %i[destroy]
- before_action :write_augur_to_gon, only: %i[upsell]
menu_item :team_planner_view
diff --git a/modules/two_factor_authentication/app/controllers/two_factor_authentication/two_factor_settings_controller.rb b/modules/two_factor_authentication/app/controllers/two_factor_authentication/two_factor_settings_controller.rb
index 15f90b972ef..6efcbc1d92d 100644
--- a/modules/two_factor_authentication/app/controllers/two_factor_authentication/two_factor_settings_controller.rb
+++ b/modules/two_factor_authentication/app/controllers/two_factor_authentication/two_factor_settings_controller.rb
@@ -1,6 +1,5 @@
module ::TwoFactorAuthentication
class TwoFactorSettingsController < ApplicationController
- include EnterpriseTrialHelper
before_action :require_admin
before_action :check_enabled
before_action :check_writable, only: :update