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

rename permission from write to add

Bruno Pagnoceb7d8f22a48
diff --git a/app/seeders/common.yml b/app/seeders/common.yml
index f4198fdf7ad..ea85f33d796 100644
--- a/app/seeders/common.yml
+++ b/app/seeders/common.yml
@@ -379,7 +379,7 @@ project_roles:
- :add_work_package_attachments
- :view_project_attributes
- :view_comments_with_restricted_visibility
- - :write_comments_with_restricted_visibility
+ - :add_comments_with_restricted_visibility
- :edit_own_comments_with_restricted_visibility
- reference: :default_role_reader
t_name: Reader
diff --git a/config/initializers/permissions.rb b/config/initializers/permissions.rb
index 42437231d48..96187a1ed4a 100644
--- a/config/initializers/permissions.rb
+++ b/config/initializers/permissions.rb
@@ -316,7 +316,7 @@ Rails.application.reloader.to_prepare do
dependencies: :view_work_packages,
visible: -> { OpenProject::FeatureDecisions.comments_with_restricted_visibility_active? }
- wpt.permission :write_comments_with_restricted_visibility,
+ wpt.permission :add_comments_with_restricted_visibility,
{},
permissible_on: %i[work_package project],
require: :loggedin,
diff --git a/config/locales/en.yml b/config/locales/en.yml
index c8109842480..8c4d1d6549a 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -3385,6 +3385,7 @@ en:
permission_add_project: "Create projects"
permission_add_work_package_attachments: "Add attachments"
permission_add_work_package_attachments_explanation: "Allows adding attachments without Edit work packages permission"
+ permission_add_comments_with_restricted_visibility: "Write comments with restricted visibility"
permission_archive_project: "Archive project"
permission_create_user: "Create users"
permission_manage_user: "Edit users"
@@ -3476,7 +3477,6 @@ en:
permission_view_wiki_pages: "View wiki"
permission_work_package_assigned: "Become assignee/responsible"
permission_work_package_assigned_explanation: "Work packages can be assigned to users and groups in possession of this role in the respective project"
- permission_write_comments_with_restricted_visibility: "Write comments with restricted visibility"
permission_view_project_activity: "View project activity"
permission_view_project_attributes: "View project attributes"
permission_view_project_stages_and_gates: "View project stages and gates"
diff --git a/db/migrate/20250227161653_populate_comments_with_restricted_visibility_permissions.rb b/db/migrate/20250227161653_populate_comments_with_restricted_visibility_permissions.rb
index 456a076ade9..ea2b5bd9116 100644
--- a/db/migrate/20250227161653_populate_comments_with_restricted_visibility_permissions.rb
+++ b/db/migrate/20250227161653_populate_comments_with_restricted_visibility_permissions.rb
@@ -35,7 +35,7 @@ class PopulateCommentsWithRestrictedVisibilityPermissions < ActiveRecord::Migrat
# grant the permission to view/write/edit comments with restricted visibility
# to users that can manage project members
::Migration::MigrationUtils::PermissionAdder.add(:manage_members, :view_comments_with_restricted_visibility)
- ::Migration::MigrationUtils::PermissionAdder.add(:manage_members, :write_comments_with_restricted_visibility)
+ ::Migration::MigrationUtils::PermissionAdder.add(:manage_members, :add_comments_with_restricted_visibility)
::Migration::MigrationUtils::PermissionAdder.add(:manage_members, :edit_own_comments_with_restricted_visibility)
end