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

Test public project list owner can't edit without global permission

Aaron Contreras639668251564
diff --git a/spec/features/projects/persisted_lists_sharing_spec.rb b/spec/features/projects/persisted_lists_sharing_spec.rb
index dc07b38f1e0..d340fcbe6f0 100644
--- a/spec/features/projects/persisted_lists_sharing_spec.rb
+++ b/spec/features/projects/persisted_lists_sharing_spec.rb
@@ -170,6 +170,23 @@ RSpec.describe "Project list sharing",
share_dialog.expect_open
share_dialog.expect_toggle_public_disabled
end
+
+ context "and the list is already public" do
+ before do
+ shared_projects_list.update(public: OpenProject::Database::DB_VALUE_TRUE)
+ end
+
+ it "doesn't allow the owner to edit its public state" do
+ login_as(sharer)
+
+ projects_index_page.visit!
+ projects_index_page.set_sidebar_filter "Member-of list"
+ projects_index_page.open_share_dialog
+
+ share_dialog.expect_open
+ share_dialog.expect_toggle_public_disabled
+ end
+ end
end
describe "Making a list public " \