diff --git a/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts b/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts index 537d71d2eb02..c6eac8375684 100644 --- a/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts +++ b/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts @@ -92,28 +92,18 @@ function workPackageFullViewTour() { }); } -function ganttTour(configuration:ConfigurationService) { +function ganttTour(_configuration:ConfigurationService) { initializeTour('ganttTourFinished'); const boardsDemoDataAvailable = getMetaContent('boards_demo_data_available') === 'true'; const teamPlannerDemoDataAvailable = getMetaContent('demo_view_of_type_team_planner_seeded') === 'true'; - const eeTokenAvailable = configuration.availableFeatures.includes('board_view'); waitForElement('.work-package--results-tbody', '#content', () => { let steps:OnboardingStep[] = ganttOnboardingTourSteps(); - // Check for EE edition - if (eeTokenAvailable) { - // ... and available seed data of boards. - // Then add boards to the tour, otherwise skip it. - if (boardsDemoDataAvailable && moduleVisible('boards')) { - steps = steps.concat(navigateToBoardStep('enterprise')); - } else if (teamPlannerDemoDataAvailable && moduleVisible('team-planner-view')) { - steps = steps.concat(navigateToTeamPlannerStep()); - } else { - steps = steps.concat(menuTourSteps()); - } - } else if (boardsDemoDataAvailable && moduleVisible('boards')) { - steps = steps.concat(navigateToBoardStep('basic')); + if (boardsDemoDataAvailable && moduleVisible('boards')) { + steps = steps.concat(navigateToBoardStep('enterprise')); + } else if (teamPlannerDemoDataAvailable && moduleVisible('team-planner-view')) { + steps = steps.concat(navigateToTeamPlannerStep()); } else { steps = steps.concat(menuTourSteps()); } @@ -122,14 +112,13 @@ function ganttTour(configuration:ConfigurationService) { }); } -function boardTour(configuration:ConfigurationService) { +function boardTour(_configuration:ConfigurationService) { initializeTour('boardsTourFinished'); const teamPlannerDemoDataAvailable = getMetaContent('demo_view_of_type_team_planner_seeded') === 'true'; - const eeTokenAvailable = configuration.availableFeatures.includes('board_view'); waitForElement('wp-single-card', '#content', () => { - let steps:OnboardingStep[] = eeTokenAvailable ? boardTourSteps('enterprise') : boardTourSteps('basic'); + let steps:OnboardingStep[] = boardTourSteps('enterprise'); // Available seed data of team planner. // Then add Team planner to the tour, otherwise skip it. diff --git a/frontend/src/app/features/boards/board/board-actions/board-actions-registry.service.ts b/frontend/src/app/features/boards/board/board-actions/board-actions-registry.service.ts index e1199b871294..259bfba5118b 100644 --- a/frontend/src/app/features/boards/board/board-actions/board-actions-registry.service.ts +++ b/frontend/src/app/features/boards/board/board-actions/board-actions-registry.service.ts @@ -1,6 +1,5 @@ import { Injectable } from '@angular/core'; import { BoardActionService } from 'core-app/features/boards/board/board-actions/board-action.service'; -import { BannersService } from 'core-app/core/enterprise/banners.service'; export interface ITileViewEntry { text:string; @@ -13,10 +12,6 @@ export interface ITileViewEntry { @Injectable({ providedIn: 'root' }) export class BoardActionsRegistryService { - constructor( - private bannersService:BannersService, - ) {} - private mapping:Record = {}; public add(attribute:string, service:BoardActionService):void { @@ -30,7 +25,6 @@ export class BoardActionsRegistryService { icon: '', description: '', image: '', - disabled: !this.bannersService.allowsTo('board_view'), })); } diff --git a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html index b85f2174ce67..fc83f4cb3ad6 100644 --- a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html +++ b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.html @@ -1,57 +1,49 @@ @if ((board$ | async); as board) { - @if (!board.isFree) { - - } - @if (available) { -
- @for (boardWidget of boardWidgets; track trackByQueryId($index, boardWidget)) { -
- @if (board.editable) { - - } - +
+ @for (boardWidget of boardWidgets; track trackByQueryId($index, boardWidget)) { +
+ @if (board.editable) { + + } + +
+ } + @if (showHiddenListWarning) { + + + + } + @if (board.editable) { +
+
+ +
- } - @if (showHiddenListWarning) { - - - - } - @if (board.editable) { -
-
- - -
-
- } -
- } +
+ } +
} diff --git a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.ts b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.ts index 3573af5c3964..cecc95010239 100644 --- a/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.ts +++ b/frontend/src/app/features/boards/board/board-partitioned-page/board-list-container.component.ts @@ -17,7 +17,6 @@ import { HalResourceNotificationService } from 'core-app/features/hal/services/h import { BoardListsService } from 'core-app/features/boards/board/board-list/board-lists.service'; import { OpModalService } from 'core-app/shared/components/modal/modal.service'; import { BoardService } from 'core-app/features/boards/board/board.service'; -import { BannersService } from 'core-app/core/enterprise/banners.service'; import { DragAndDropService } from 'core-app/shared/helpers/drag-and-drop/drag-and-drop.service'; import { QueryUpdatedService } from 'core-app/features/boards/board/query-updated/query-updated.service'; import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin'; @@ -40,7 +39,6 @@ import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service'; import { WorkPackageStatesInitializationService, } from 'core-app/features/work-packages/components/wp-list/wp-states-initialization.service'; -import { enterpriseDocsUrl } from 'core-app/core/setup/globals/constants.const'; @Component({ templateUrl: './board-list-container.component.html', @@ -89,8 +87,6 @@ export class BoardListContainerComponent extends UntilDestroyedMixin implements showHiddenListWarning = false; - available = this.Banner.allowsTo('board_view'); - private currentQueryUpdatedMonitoring:Subscription; constructor( @@ -105,7 +101,6 @@ readonly I18n:I18nService, readonly injector:Injector, readonly apiV3Service:ApiV3Service, readonly Boards:BoardService, - readonly Banner:BannersService, readonly boardListCrossSelectionService:BoardListCrossSelectionService, readonly wpStatesInitialization:WorkPackageStatesInitializationService, readonly Drag:DragAndDropService, @@ -126,10 +121,6 @@ readonly I18n:I18nService, tap((board) => this.setupQueryUpdatedMonitoring(board)), ); - this.board$.subscribe((board) => { - this.available = this.Banner.allowsTo('board_view') || board.isFree; - }); - this.Boards.currentBoard$.next(id); this.boardListCrossSelectionService diff --git a/modules/boards/app/controllers/boards/boards_controller.rb b/modules/boards/app/controllers/boards/boards_controller.rb index 5cdc24cb6546..808107f50d68 100644 --- a/modules/boards/app/controllers/boards/boards_controller.rb +++ b/modules/boards/app/controllers/boards/boards_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ::Boards class BoardsController < BaseController include Layout @@ -11,7 +13,6 @@ class BoardsController < BaseController before_action :build_board_grid, only: %i[new] before_action :load_query, only: %i[index] - before_action :ensure_board_type_not_restricted, only: %i[create] menu_item :boards @@ -85,14 +86,6 @@ def build_board_grid @board_grid = Boards::Grid.new end - def ensure_board_type_not_restricted - render_403 if restricted_board_type? - end - - def restricted_board_type? - !EnterpriseToken.allows_to?(:board_view) && board_grid_params[:attribute] != "basic" - end - def service_call service_class.new(user: User.current) .call( @@ -114,7 +107,7 @@ def service_class end def board_grid_params - params.require(:boards_grid).permit(%i[name attribute]) + params.expect(boards_grid: %i[name attribute]) end end end diff --git a/modules/boards/app/helpers/boards_helper.rb b/modules/boards/app/helpers/boards_helper.rb index 60f7fe4acc55..3519e0407ed1 100644 --- a/modules/boards/app/helpers/boards_helper.rb +++ b/modules/boards/app/helpers/boards_helper.rb @@ -4,12 +4,11 @@ module BoardsHelper BoardTypeAttributes = Struct.new(:radio_button_value, :title, :description, - :image_path, - :disabled?) + :image_path) def board_types [ - build_board_type_attributes("basic", "lists", false), + build_board_type_attributes("basic", "lists"), build_board_type_attributes("status", "status"), build_board_type_attributes("assignee", "assignees"), build_board_type_attributes("version", "version"), @@ -18,12 +17,11 @@ def board_types ] end - def build_board_type_attributes(type_name, image_name, disabled = !EnterpriseToken.allows_to?(:board_view)) + def build_board_type_attributes(type_name, image_name) BoardTypeAttributes.new(type_name, I18n.t("boards.board_type_attributes.#{type_name}"), I18n.t("boards.board_type_descriptions.#{type_name}"), - "assets/images/board_creation_modal/#{image_name}.svg", - disabled) + "assets/images/board_creation_modal/#{image_name}.svg") end def global_board_create_context? @@ -35,6 +33,6 @@ def global_board_new_action? end def global_board_create_action? - request.path == work_package_boards_path && @project.nil? + request.path == work_package_boards_path && controller.params[:project_id].blank? end end diff --git a/modules/boards/app/views/boards/boards/_form.html.erb b/modules/boards/app/views/boards/boards/_form.html.erb index fa7f31d6de98..e158ec63b0c1 100644 --- a/modules/boards/app/views/boards/boards/_form.html.erb +++ b/modules/boards/app/views/boards/boards/_form.html.erb @@ -59,14 +59,10 @@ See COPYRIGHT and LICENSE files for more details.
-
- <%= - render(EnterpriseEdition::BannerComponent.new(:board_view)) - %> - +
<% board_types.each_with_index do |board_type, tile_number| %> -