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

Remove widget enterprise add-on

Oliver Günther993b18070873
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 59f4097ba8c..9d626cd821f 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -2061,7 +2061,6 @@ en:
define_custom_style: Custom theme and logo
edit_attribute_groups: Edit Attribute Groups
gantt_pdf_export: Gantt PDF Export
- grid_widget_wp_graph: Grid Widget Work Package Graph
ldap_groups: LDAP users and group sync
one_drive_sharepoint_file_storage: OneDrive/SharePoint File Storage
placeholder_users: Placeholder Users
diff --git a/frontend/src/app/shared/components/grids/widgets/add/add.modal.html b/frontend/src/app/shared/components/grids/widgets/add/add.modal.html
index ac2a64d572a..270ffe16aae 100644
--- a/frontend/src/app/shared/components/grids/widgets/add/add.modal.html
+++ b/frontend/src/app/shared/components/grids/widgets/add/add.modal.html
@@ -7,10 +7,6 @@
<div class="spot-divider"></div>
<div class="ngdialog-body spot-modal--body spot-container">
- <op-enterprise-banner-frame
- feature="grid_widget_wp_graph"
- [dismissable]="true"
- ></op-enterprise-banner-frame>
<ul class="spot-list">
<li
*ngFor="let widget of selectable;trackBy: trackWidgetBy"
diff --git a/frontend/src/app/shared/components/grids/widgets/add/add.modal.ts b/frontend/src/app/shared/components/grids/widgets/add/add.modal.ts
index 49eac1e2beb..9d2bcad96e2 100644
--- a/frontend/src/app/shared/components/grids/widgets/add/add.modal.ts
+++ b/frontend/src/app/shared/components/grids/widgets/add/add.modal.ts
@@ -46,7 +46,6 @@ export class AddGridWidgetModalComponent extends OpModalComponent implements OnI
ngOnInit() {
super.ngOnInit();
- this.eeShowBanners = this.bannerService.showBannerFor('grid_widget_wp_graph');
this.fetchSchema();
}
diff --git a/modules/dashboards/spec/features/work_package_graph_spec.rb b/modules/dashboards/spec/features/work_package_graph_spec.rb
index 4f71d0c9e45..26a126505da 100644
--- a/modules/dashboards/spec/features/work_package_graph_spec.rb
+++ b/modules/dashboards/spec/features/work_package_graph_spec.rb
@@ -32,8 +32,7 @@ require_relative "../support/pages/dashboard"
RSpec.describe "Arbitrary WorkPackage query graph widget dashboard",
:js,
- :selenium,
- with_ee: %i[grid_widget_wp_graph] do
+ :selenium do
let!(:type) { create(:type) }
let!(:other_type) { create(:type) }
let!(:priority) { create(:default_priority) }
@@ -167,14 +166,4 @@ RSpec.describe "Arbitrary WorkPackage query graph widget dashboard",
dashboard_page.expect_unable_to_add_widget(1, 1, :within, "Work packages graph")
end
end
-
- context "without an enterprise edition", with_ee: false do
- it "cannot add the widget and receives an enterprise edition notice" do
- dashboard_page.expect_add_widget_enterprise_edition_notice(1, 2, :within)
-
- # At this point the add widget modal is open
- expect(page)
- .to have_no_content("Work packages graph")
- end
- end
end
diff --git a/modules/grids/config/locales/js-en.yml b/modules/grids/config/locales/js-en.yml
index 8b804bb0ea5..4d1a5838e3c 100644
--- a/modules/grids/config/locales/js-en.yml
+++ b/modules/grids/config/locales/js-en.yml
@@ -1,8 +1,4 @@
en:
- ee:
- upsell:
- grid_widget_wp_graph:
- description: "Some widgets, like the work package graph widget, are only available in the Enterprise edition."
js:
grid:
add_widget: 'Add widget'
diff --git a/modules/grids/lib/grids/configuration/in_project_base_registration.rb b/modules/grids/lib/grids/configuration/in_project_base_registration.rb
index 647789e59b3..d57d685d218 100644
--- a/modules/grids/lib/grids/configuration/in_project_base_registration.rb
+++ b/modules/grids/lib/grids/configuration/in_project_base_registration.rb
@@ -22,11 +22,6 @@ module Grids::Configuration
user.allowed_in_project?(:manage_public_queries, project)
}
- queries_permission_and_ee_lambda = ->(user, project) {
- save_or_manage_queries_lambda.call(user, project) &&
- EnterpriseToken.allows_to?(:grid_widget_wp_graph)
- }
-
view_work_packages_lambda = ->(user, project) {
user.allowed_in_any_work_package?(:view_work_packages, in_project: project)
}
@@ -42,7 +37,7 @@ module Grids::Configuration
widget_strategy "work_packages_graph" do
after_destroy remove_query_lambda
- allowed queries_permission_and_ee_lambda
+ allowed save_or_manage_queries_lambda
options_representer "::API::V3::Grids::Widgets::ChartOptionsRepresenter"
end