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

Update add restricted comment permission name

Kabiru Mwenja450e34a3711d
diff --git a/app/components/work_packages/activities_tab/journals/new_component.rb b/app/components/work_packages/activities_tab/journals/new_component.rb
index 3c7a49699c6..5205ce019ff 100644
--- a/app/components/work_packages/activities_tab/journals/new_component.rb
+++ b/app/components/work_packages/activities_tab/journals/new_component.rb
@@ -60,7 +60,7 @@ module WorkPackages
def adding_restricted_comment_allowed?
OpenProject::FeatureDecisions.comments_with_restricted_visibility_active? &&
- User.current.allowed_in_work_package?(:write_comments_with_restricted_visibility, work_package)
+ User.current.allowed_in_work_package?(:add_comments_with_restricted_visibility, work_package)
end
end
end
diff --git a/spec/features/activities/work_package/restricted_visibility_comments_spec.rb b/spec/features/activities/work_package/restricted_visibility_comments_spec.rb
index d299ba10afe..2be579bc806 100644
--- a/spec/features/activities/work_package/restricted_visibility_comments_spec.rb
+++ b/spec/features/activities/work_package/restricted_visibility_comments_spec.rb
@@ -162,7 +162,7 @@ RSpec.describe "Work package comments with restricted visibility",
permissions: %i[view_work_packages add_work_package_notes
edit_own_work_package_notes
view_comments_with_restricted_visibility
- write_comments_with_restricted_visibility
+ add_comments_with_restricted_visibility
edit_own_comments_with_restricted_visibility
edit_others_comments_with_restricted_visibility])
create(:user, firstname: "Project", lastname: "Admin",
@@ -182,7 +182,7 @@ RSpec.describe "Work package comments with restricted visibility",
permissions: %i[view_work_packages add_work_package_notes
edit_own_work_package_notes
view_comments_with_restricted_visibility
- write_comments_with_restricted_visibility
+ add_comments_with_restricted_visibility
edit_own_comments_with_restricted_visibility])
create(:user,
firstname: "A",