Revert "Add contract strategy for BCF module"

This reverts commit ab292c62088be409eb6f93bd86445212837bf39c.
pull/9957/head
Henriette Darge 3 years ago
parent c3c77d1ea4
commit 9c13f2667d
  1. 3
      frontend/src/app/features/work-packages/components/wp-list/wp-query-view.service.ts
  2. 24
      modules/bim/app/contracts/bim/ifc_models/views/contract_strategy.rb
  3. 3
      modules/bim/lib/open_project/bim/engine.rb

@ -39,9 +39,6 @@ export class WorkPackagesQueryViewService {
if (this.$state.includes('team_planner')) {
return 'team_planner';
}
if (this.$state.includes('bim')) {
return 'BCF';
}
throw new Error('Not on a path defined for query views');
}

@ -1,24 +0,0 @@
module ::Bim
module Views
class ContractStrategy < ::BaseContract
validate :manageable
private
def manageable
return if model.query.blank?
errors.add(:base, :error_unauthorized) unless query_permissions?
end
def query_permissions?
# TODO: This currently does not differentiate between public and private queries since it isn't specified yet.
user_allowed_on_query?(:manage_ifc_models)
end
def user_allowed_on_query?(permission)
user.allowed_to?(permission, model.query.project, global: model.query.project.nil?)
end
end
end
end

@ -100,9 +100,6 @@ module OpenProject::Bim
end
end
add_view :BCF,
contract_strategy: 'Bim::Views::ContractStrategy'
class_inflection_override('v2_1' => 'V2_1')
assets %w(bim/logo_openproject_bim_big.png)

Loading…
Cancel
Save