undf: assign UNDF numbers, stamp patches; 878 total
This commit is contained in:
parent
8b5e3c35b1
commit
494d1c82a3
6 changed files with 216 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000876
|
||||
--- a/app/models/issue.rb
|
||||
+++ b/app/models/issue.rb
|
||||
@@ -1332,15 +1332,16 @@
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# UNDF: UNDF-2026-000000877
|
||||
--- a/app/models/issue.rb
|
||||
+++ b/app/models/issue.rb
|
||||
@@ -1352,7 +1352,7 @@
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
# UNDF: UNDF-2026-000000878
|
||||
--- a/app/models/user.rb
|
||||
+++ b/app/models/user.rb
|
||||
@@ -700,9 +700,10 @@
|
||||
members = Member.joins(:project, :member_roles).
|
||||
where("#{Project.table_name}.status <> 9").
|
||||
where("#{Member.table_name}.user_id = ? OR (#{Project.table_name}.is_public = ? AND #{Member.table_name}.user_id = ?)", self.id, true, group_id).
|
||||
pluck(:user_id, :role_id, :project_id)
|
||||
|
||||
+ project_ids_set = project_ids.to_set # O(1) lookup instead of O(P) Array#include?
|
||||
hash = {}
|
||||
members.each do |user_id, role_id, project_id|
|
||||
# Ignore the roles of the builtin group if the user is a member of the project
|
||||
- next if user_id != id && project_ids.include?(project_id)
|
||||
+ next if user_id != id && project_ids_set.include?(project_id)
|
||||
|
||||
hash[role_id] ||= []
|
||||
hash[role_id] << project_id
|
||||
Loading…
Add table
Add a link
Reference in a new issue