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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix: Add permission to view BCF issues
Wieland Lindenthal4c347ddbb3ee
diff --git a/modules/bcf/lib/open_project/bcf/engine.rb b/modules/bcf/lib/open_project/bcf/engine.rbindex d1b5dd4bff5..f6567344e7e 100644--- a/modules/bcf/lib/open_project/bcf/engine.rb+++ b/modules/bcf/lib/open_project/bcf/engine.rb@@ -70,6 +70,7 @@ module OpenProject::Bcfpatches %i[WorkPackage Type Journal]patch_with_namespace :BasicData, :SettingSeeder+ patch_with_namespace :BasicData, :RoleSeederpatch_with_namespace :API, :V3, :Activities, :ActivityRepresenterpatch_with_namespace :Journal, :AggregatedJournalpatch_with_namespace :API, :V3, :Activities, :ActivitiesSharedHelpersdiff --git a/modules/bcf/lib/open_project/bcf/patches/role_seeder_patch.rb b/modules/bcf/lib/open_project/bcf/patches/role_seeder_patch.rbnew file mode 100644index 00000000000..01380974c02--- /dev/null+++ b/modules/bcf/lib/open_project/bcf/patches/role_seeder_patch.rb@@ -0,0 +1,35 @@+module OpenProject::Bcf::Patches::RoleSeederPatch+ def self.included(base) # :nodoc:+ base.prepend InstanceMethods+ end++ module InstanceMethods+ def member+ role_attributes = super+ role_attributes[:permissions] = role_attributes[:permissions] + %i[view_linked_issues manage_bcf]++ role_attributes+ end++ def reader+ role_attributes = super+ role_attributes[:permissions] = role_attributes[:permissions] + %i[view_linked_issues]++ role_attributes+ end++ def non_member+ role_attributes = super+ role_attributes[:permissions] = role_attributes[:permissions] + %i[view_linked_issues]++ role_attributes+ end++ def anonymous+ role_attributes = super+ role_attributes[:permissions] = role_attributes[:permissions] + %i[view_linked_issues]++ role_attributes+ end+ end+end