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

Add spec

Oliver Günther048dd5cde19e
diff --git a/spec/features/global_roles/global_role_crud_spec.rb b/spec/features/global_roles/global_role_crud_spec.rb
index 7fbcb68b527..0731870ec1d 100644
--- a/spec/features/global_roles/global_role_crud_spec.rb
+++ b/spec/features/global_roles/global_role_crud_spec.rb
@@ -62,4 +62,18 @@ RSpec.describe "Global role: Global role CRUD", :js, :with_cuprite do
# Then I should see "Successful creation."
expect(page).to have_text "Successful creation."
end
+
+ context "with a non-member using dependent project permissions" do
+ let!(:non_member) { create(:non_member, permissions: %i[view_project_attributes]) }
+
+ it "can still create it (Regression #57906)" do
+ # When I go to the new page of "Role"
+ visit new_role_path
+ check "Global role"
+ fill_in "Name", with: "Manager"
+ click_on "Create"
+ # Then I should see "Successful creation."
+ expect(page).to have_text "Successful creation."
+ end
+ end
end