Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions config/initializers/feature_decisions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,3 @@
OpenProject::FeatureDecisions.add :wiki_enhancements,
description: "Enables Wiki enhancements, such as the Wikis tab and XWiki integration.",
force_active: true

OpenProject::FeatureDecisions.add :departments,
description: "Enables the management of departments within the organization."

2 changes: 1 addition & 1 deletion config/initializers/menus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@

menu.push :departments,
{ controller: "/admin/departments" },
if: ->(_) { User.current.admin? && OpenProject::FeatureDecisions.departments_active? },
if: ->(_) { User.current.admin? },
caption: :label_departments,
parent: :users_and_permissions

Expand Down
3 changes: 1 addition & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,7 @@
end

resources :departments,
only: %i[index show edit update destroy],
constraints: lambda { |_request| OpenProject::FeatureDecisions.departments_active? } do
only: %i[index show edit update destroy] do
member do
get :new_user
post :add_user
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/admin/departments_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

require "spec_helper"

RSpec.describe Admin::DepartmentsController, with_flag: { departments: true } do
RSpec.describe Admin::DepartmentsController do
before do
login_as current_user
end
Expand Down
3 changes: 1 addition & 2 deletions spec/features/admin/departments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
require "support/pages/admin/departments"

RSpec.describe "Departments admin",
:js,
with_flag: { departments: true } do
:js do
shared_let(:admin) { create(:admin) }

let(:departments_page) { Pages::Admin::Departments.new }
Expand Down
Loading